pub struct IfShell { /* private fields */ }Expand description
Typed arguments for conditional tmux command execution.
Implementations§
Source§impl IfShell
impl IfShell
Sourcepub fn new(
condition: impl Into<OsString>,
if_command: impl Into<OsString>,
) -> Self
pub fn new( condition: impl Into<OsString>, if_command: impl Into<OsString>, ) -> Self
Creates a shell condition and success command.
Sourcepub fn else_command(self, command: impl Into<OsString>) -> Self
pub fn else_command(self, command: impl Into<OsString>) -> Self
Sets the command run when the condition is false.
Sourcepub const fn background(self, enabled: bool) -> Self
pub const fn background(self, enabled: bool) -> Self
Runs without blocking the tmux command queue.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IfShell
impl RefUnwindSafe for IfShell
impl Send for IfShell
impl Sync for IfShell
impl Unpin for IfShell
impl UnsafeUnpin for IfShell
impl UnwindSafe for IfShell
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
Mutably borrows from an owned value. Read more