pub trait CommandUnify<Child: ChildUnify>: Sized {
// Required methods
fn new<S: AsRef<OsStr>>(program: S) -> Self;
fn args<I, S>(&mut self, args: I) -> &mut Self
where I: IntoIterator<Item = S>,
S: AsRef<OsStr>;
fn stdin<T: Into<Stdio>>(&mut self, cfg: T) -> &mut Self;
fn stdout<T: Into<Stdio>>(&mut self, cfg: T) -> &mut Self;
fn stderr<T: Into<Stdio>>(&mut self, cfg: T) -> &mut Self;
fn spawn(&mut self) -> AnyResult<Child>;
}
Expand description
Abstraction of command methods in multiple libraries.
Required Methods§
Sourcefn new<S: AsRef<OsStr>>(program: S) -> Self
fn new<S: AsRef<OsStr>>(program: S) -> Self
Constructs a new Command for launching the program at path program.
Sourcefn stdin<T: Into<Stdio>>(&mut self, cfg: T) -> &mut Self
fn stdin<T: Into<Stdio>>(&mut self, cfg: T) -> &mut Self
Configuration for the child process’s standard input (stdin) handle.
Sourcefn stdout<T: Into<Stdio>>(&mut self, cfg: T) -> &mut Self
fn stdout<T: Into<Stdio>>(&mut self, cfg: T) -> &mut Self
Configuration for the child process’s standard output (stdout) handle.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.