[−][src]Trait mmrbi::CommandExt
Utility methods for std::process::Command
Required methods
pub fn status0(&mut self) -> Result<()>
[src]
Command::status, but returns an error if the process didn't have a zero exit code
pub fn output0(&mut self) -> Result<Output>
[src]
Command::output, but returns an error if the process didn't have a zero exit code
pub fn stdout0(&mut self) -> Result<String>
[src]
Command::output, but:
- Returns an error if the process didn't have a zero exit code
- Returns an error if stdout wasn't valid unicode
- Returns only stdout
- Stderr is inherited instead of redirected
pub fn stdout0_no_stderr(&mut self) -> Result<String>
[src]
Command::output, but:
- Returns an error if the process didn't have a zero exit code
- Returns an error if stdout wasn't valid unicode
- Returns only stdout
- Stderr is nulled instead of redirected
pub fn io(
&mut self,
on_out: impl Fn(&str) + Send + Sync + 'static,
on_err: impl Fn(&str) + Send + Sync + 'static
) -> Result<ExitStatus>
[src]
&mut self,
on_out: impl Fn(&str) + Send + Sync + 'static,
on_err: impl Fn(&str) + Send + Sync + 'static
) -> Result<ExitStatus>
Command::status, but provides a callback for stdout/stderr
pub fn io0(
&mut self,
on_out: impl Fn(&str) + Send + Sync + 'static,
on_err: impl Fn(&str) + Send + Sync + 'static
) -> Result<()>
[src]
&mut self,
on_out: impl Fn(&str) + Send + Sync + 'static,
on_err: impl Fn(&str) + Send + Sync + 'static
) -> Result<()>
Command::status, but provides a callback for stdout/stderr and returns an error if the process didn't have a zero exit code
Implementations on Foreign Types
impl CommandExt for Command
[src]
pub fn status0(&mut self) -> Result<()>
[src]
pub fn output0(&mut self) -> Result<Output>
[src]
pub fn stdout0(&mut self) -> Result<String>
[src]
pub fn stdout0_no_stderr(&mut self) -> Result<String>
[src]
pub fn io(
&mut self,
on_out: impl Fn(&str) + Send + Sync + 'static,
on_err: impl Fn(&str) + Send + Sync + 'static
) -> Result<ExitStatus>
[src]
&mut self,
on_out: impl Fn(&str) + Send + Sync + 'static,
on_err: impl Fn(&str) + Send + Sync + 'static
) -> Result<ExitStatus>
pub fn io0(
&mut self,
on_out: impl Fn(&str) + Send + Sync + 'static,
on_err: impl Fn(&str) + Send + Sync + 'static
) -> Result<()>
[src]
&mut self,
on_out: impl Fn(&str) + Send + Sync + 'static,
on_err: impl Fn(&str) + Send + Sync + 'static
) -> Result<()>
Implementors
impl CommandExt for mmrbi::Command
[src]
pub fn status0(&mut self) -> Result<()>
[src]
pub fn output0(&mut self) -> Result<Output>
[src]
pub fn stdout0(&mut self) -> Result<String>
[src]
pub fn stdout0_no_stderr(&mut self) -> Result<String>
[src]
pub fn io(
&mut self,
on_out: impl Fn(&str) + Send + Sync + 'static,
on_err: impl Fn(&str) + Send + Sync + 'static
) -> Result<ExitStatus>
[src]
&mut self,
on_out: impl Fn(&str) + Send + Sync + 'static,
on_err: impl Fn(&str) + Send + Sync + 'static
) -> Result<ExitStatus>
pub fn io0(
&mut self,
on_out: impl Fn(&str) + Send + Sync + 'static,
on_err: impl Fn(&str) + Send + Sync + 'static
) -> Result<()>
[src]
&mut self,
on_out: impl Fn(&str) + Send + Sync + 'static,
on_err: impl Fn(&str) + Send + Sync + 'static
) -> Result<()>