pub struct WorkingDirectoryPoolGuardMut<'pool> { /* private fields */ }Implementations§
Source§impl<'pool> WorkingDirectoryPoolGuardMut<'pool>
impl<'pool> WorkingDirectoryPoolGuardMut<'pool>
The mut guard can also do shared operations; XX todo: just Deref, ah, would be double use of deref?
pub fn locked_base_dir<'s>(&'s self) -> WorkingDirectoryPoolBaseDirLock<'s>
Source§impl<'pool> WorkingDirectoryPoolGuardMut<'pool>
impl<'pool> WorkingDirectoryPoolGuardMut<'pool>
Sourcepub fn get_working_directory_mut<'guard>(
&'guard mut self,
working_directory_id: WorkingDirectoryId,
) -> Option<WorkingDirectoryWithPoolLockMut<'guard>>
pub fn get_working_directory_mut<'guard>( &'guard mut self, working_directory_id: WorkingDirectoryId, ) -> Option<WorkingDirectoryWithPoolLockMut<'guard>>
There’s also a method on WorkingDirectoryPool!
Sourcepub fn into_get_working_directory_mut(
self,
working_directory_id: WorkingDirectoryId,
) -> WorkingDirectoryWithPoolMut<'pool>
pub fn into_get_working_directory_mut( self, working_directory_id: WorkingDirectoryId, ) -> WorkingDirectoryWithPoolMut<'pool>
Similar to get_working_directory_mut but transfer ownership
of the guard into the result (does not unlock!).
Sourcepub fn get_first(&mut self) -> Result<WorkingDirectoryId>
pub fn get_first(&mut self) -> Result<WorkingDirectoryId>
Always gets a working directory, but doesn’t check for any best fit. If none was cloned yet, that is done now.
Sourcepub fn delete_working_directory(
&mut self,
working_directory_id: WorkingDirectoryId,
) -> Result<()>
pub fn delete_working_directory( &mut self, working_directory_id: WorkingDirectoryId, ) -> Result<()>
Note: may leave behind a broken current symlink, but that’s
probably the way it should be?
Sourcepub fn get_a_working_directory_for<'s>(
&'s mut self,
run_parameters: &RunParameters,
run_queues_data: &RunQueuesData<'_>,
) -> Result<WorkingDirectoryId>
pub fn get_a_working_directory_for<'s>( &'s mut self, run_parameters: &RunParameters, run_queues_data: &RunQueuesData<'_>, ) -> Result<WorkingDirectoryId>
Return the ~best working directory for the given run_parameters (e.g. with the requested commit checked out) and queue pipeline situation (e.g. if forced to change the checked out commit in a working directory, choose one that doesn’t have a commit checked out that is in the pipeline). Does not check out the commit needed for run_parameters!
Sourcepub fn clear_current_working_directory(&self) -> Result<()>
pub fn clear_current_working_directory(&self) -> Result<()>
Remove the symlink to the currently used working directory. TODO: this is a mess, always forgetting; at least move to a compile time checked API? What was the purpose, really: sure, it was to put in some check that the dir was actually removed normally? But then that ‘never’ happens anyway? Do the removal statically (and for the case of errors preventing the removal, just always remove at runtime when setting it anew / do tmp-and-rename)?
Auto Trait Implementations§
impl<'pool> Freeze for WorkingDirectoryPoolGuardMut<'pool>
impl<'pool> RefUnwindSafe for WorkingDirectoryPoolGuardMut<'pool>
impl<'pool> Send for WorkingDirectoryPoolGuardMut<'pool>
impl<'pool> Sync for WorkingDirectoryPoolGuardMut<'pool>
impl<'pool> Unpin for WorkingDirectoryPoolGuardMut<'pool>
impl<'pool> !UnwindSafe for WorkingDirectoryPoolGuardMut<'pool>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Source§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);