[][src]Struct bawawa::Command

pub struct Command { /* fields omitted */ }

just like standard Command but keeps the components in a human readable format so we can actually display it when needed. or keep trace of it.

a Command is not active unless it has been started

Methods

impl Command[src]

pub fn new(program: Program) -> Self[src]

create a new command

pub fn current_working_directory(&mut self, cwd: PathBuf) -> &mut Self[src]

set the working directory: the directory in which the command will be executed.

pub fn argument<S>(&mut self, argument: S) -> &mut Self where
    S: AsRef<str>, 
[src]

set argument to the command

pub fn arguments<I, S>(&mut self, arguments: I) -> &mut Self where
    I: IntoIterator<Item = S>,
    S: AsRef<str>, 
[src]

set arguments to the command

pub fn spawn(&self) -> Result<Process>[src]

spawn the command into the given process

Error

the function may fail if between the time the Program object was constructed and the call of this function the program situation as changed (permission, renamed, removed...).

Trait Implementations

impl PartialEq<Command> for Command[src]

impl Clone for Command[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Eq for Command[src]

impl Display for Command[src]

impl Debug for Command[src]

impl Hash for Command[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for Command

impl Unpin for Command

impl Sync for Command

impl UnwindSafe for Command

impl RefUnwindSafe for Command

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T