Skip to main content

CmdRun

Trait CmdRun 

Source
pub trait CmdRun {
    // Required method
    fn run(&mut self) -> Result<(), CmdSpawnError>;
}

Required Methods§

Source

fn run(&mut self) -> Result<(), CmdSpawnError>

spawn and wait child process

§Errors

command.run() can result in CmdSpawnError:

  • CmdSpawnError::IO(std::io::Error) when spawn or wait fail
  • CmdSpawnError::Child(ChildError) when the child process exit with a failed status

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CmdRun for Command

Source§

fn run(&mut self) -> Result<(), CmdSpawnError>

Implementors§