pub struct Command(/* private fields */);
Expand description
Abstraction of an external command.
§Example
let cmd = Command::parse_str(r#"grep -Eo "\w\w\sa[^.]*""#)?;
// or
let cmd = Command::new("grep").args(&["-Eo", r"\w\w\sa[^.]*"]);
Implementations§
Source§impl Command
impl Command
Sourcepub fn arg<S>(self, arg: S) -> Self
pub fn arg<S>(self, arg: S) -> Self
Adds a single argument to an existing Command instance.
§Example
let cmd = Command::new("ls").arg("-la");
Trait Implementations§
Source§impl BitOr<Command> for CommandPipe
impl BitOr<Command> for CommandPipe
Source§impl BitOr for Command
impl BitOr for Command
Source§type Output = CommandPipe
type Output = CommandPipe
The resulting type after applying the
|
operator.Source§fn bitor(self, rhs: Self) -> CommandPipe
fn bitor(self, rhs: Self) -> CommandPipe
Performs the
|
operation. Read moreAuto Trait Implementations§
impl Freeze for Command
impl !RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl !UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more