Trait CmdToFile

Source
pub trait CmdToFile {
    // Required method
    fn to_file(
        &mut self,
        file: File,
        stderr_file: Option<File>,
    ) -> Result<(), CmdSpawnError>;
}

Required Methods§

Source

fn to_file( &mut self, file: File, stderr_file: Option<File>, ) -> Result<(), CmdSpawnError>

spawn, wait and stdout to file for the child process, optional stderr to stderr_file

§Errors

command.to_file(file, err_file) 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

Implementations on Foreign Types§

Source§

impl CmdToFile for Command

Source§

fn to_file( &mut self, file: File, stderr_file: Option<File>, ) -> Result<(), CmdSpawnError>

Implementors§