pub enum Cmd {
Cd {
cmd: Command,
stderr: StderrTarget,
},
Echo {
cmd: Command,
stdout: StdoutTarget,
stderr: StderrTarget,
},
Exit(u8),
Type {
cmd: Command,
stdout: StdoutTarget,
stderr: StderrTarget,
},
Exec {
cmd: Command,
stdout: StdoutTarget,
stderr: StderrTarget,
},
Pwd {
stdout: StdoutTarget,
stderr: StderrTarget,
},
History {
cmd: Command,
stdout: StdoutTarget,
stderr: StderrTarget,
},
Unknown {
cmd: Command,
stderr: StderrTarget,
},
}Variants§
Implementations§
Source§impl Cmd
impl Cmd
Sourcepub const fn is_history(&self) -> bool
pub const fn is_history(&self) -> bool
Returns true if the enum is Cmd::History otherwise false
Sourcepub const fn is_unknown(&self) -> bool
pub const fn is_unknown(&self) -> bool
Returns true if the enum is Cmd::Unknown otherwise false
Source§impl Cmd
impl Cmd
pub fn try_as_exit(self) -> Option<u8>
pub const fn try_as_exit_ref(&self) -> Option<&u8>
pub fn try_as_exit_mut(&mut self) -> Option<&mut u8>
Trait Implementations§
impl StructuralPartialEq for Cmd
Auto Trait Implementations§
impl Freeze for Cmd
impl RefUnwindSafe for Cmd
impl Send for Cmd
impl Sync for Cmd
impl Unpin for Cmd
impl UnsafeUnpin for Cmd
impl UnwindSafe for Cmd
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