pub trait CmdToFile {
// Required method
fn to_file(
&mut self,
file: File,
stderr_file: Option<File>,
) -> Result<(), CmdSpawnError>;
}
Required Methods§
Sourcefn to_file(
&mut self,
file: File,
stderr_file: Option<File>,
) -> Result<(), CmdSpawnError>
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)
whenspawn
orwait
failCmdSpawnError::Child(ChildError)
when the child process exit with a failed status