pub trait Process: Sized {
type Command;
type Stream;
// Required methods
fn spawn<S: AsRef<str>>(cmd: S) -> Result<Self>;
fn spawn_command(command: Self::Command) -> Result<Self>;
fn open_stream(&mut self) -> Result<Self::Stream>;
}Expand description
This trait represents a platform independent process which runs a program.
Required Associated Types§
Required Methods§
Sourcefn spawn<S: AsRef<str>>(cmd: S) -> Result<Self>
fn spawn<S: AsRef<str>>(cmd: S) -> Result<Self>
Spawn parses a given string as a commandline string and spawns it on a process.
Sourcefn spawn_command(command: Self::Command) -> Result<Self>
fn spawn_command(command: Self::Command) -> Result<Self>
Spawn_command runs a process with a given command.
Sourcefn open_stream(&mut self) -> Result<Self::Stream>
fn open_stream(&mut self) -> Result<Self::Stream>
It opens a IO stream with a spawned process.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".