pub struct Executor<'a, S>{ /* private fields */ }Expand description
A lazy piped command executor.
Implementations§
Source§impl<'a, S> Executor<'a, S>
impl<'a, S> Executor<'a, S>
Sourcepub fn new(
stdin: Option<&'a S>,
piped_commands: impl FnMut(Option<&'a S>) -> Result<Child, ExecutorError> + 'a,
) -> Self
pub fn new( stdin: Option<&'a S>, piped_commands: impl FnMut(Option<&'a S>) -> Result<Child, ExecutorError> + 'a, ) -> Self
Construct a PipeExecutor.
Sourcepub fn status(&mut self) -> Result<ExitStatus, ExecutorError>
pub fn status(&mut self) -> Result<ExitStatus, ExecutorError>
Retrieves the ExitStatus of the last command.
§Errors
Will error if the exit status of any chained commands fail.