pub struct TmcCommand { /* private fields */ }Expand description
Wrapper around subprocess::Exec
Implementations§
Source§impl TmcCommand
impl TmcCommand
Sourcepub fn with(self, f: impl FnOnce(Exec) -> Exec) -> Self
pub fn with(self, f: impl FnOnce(Exec) -> Exec) -> Self
Allows modification of the internal command without providing access to it.
Sourcepub fn set_stdin_data(self, data: String) -> Self
pub fn set_stdin_data(self, data: String) -> Self
Gives the command data to write into stdin.
Sourcepub fn status(self) -> Result<ExitStatus, TmcError>
pub fn status(self) -> Result<ExitStatus, TmcError>
Executes the command and waits for its output.
Sourcepub fn output_checked(self) -> Result<Output, TmcError>
pub fn output_checked(self) -> Result<Output, TmcError>
Executes the command and waits for its output and errors if the status is not successful.
Auto Trait Implementations§
impl Freeze for TmcCommand
impl RefUnwindSafe for TmcCommand
impl !Send for TmcCommand
impl !Sync for TmcCommand
impl Unpin for TmcCommand
impl UnwindSafe for TmcCommand
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