[][src]Trait execute::Execute

pub trait Execute {
    fn execute(&mut self) -> Result<Option<i32>, Error>;
fn execute_output(&mut self) -> Result<Output, Error>;
fn execute_input<D: ?Sized + AsRef<[u8]>>(
        &mut self,
        data: &D
    ) -> Result<Option<i32>, Error>;
fn execute_input_output<D: ?Sized + AsRef<[u8]>>(
        &mut self,
        data: &D
    ) -> Result<Output, Error>;
fn execute_input_reader2<N: ArrayLength<u8> + IsGreaterOrEqual<U1, Output = True>>(
        &mut self,
        reader: &mut dyn Read
    ) -> Result<Option<i32>, Error>;
fn execute_input_reader_output2<N: ArrayLength<u8> + IsGreaterOrEqual<U1, Output = True>>(
        &mut self,
        reader: &mut dyn Read
    ) -> Result<Output, Error>;
fn execute_multiple(
        &mut self,
        others: &mut [&mut Command]
    ) -> Result<Option<i32>, Error>;
fn execute_multiple_output(
        &mut self,
        others: &mut [&mut Command]
    ) -> Result<Output, Error>;
fn execute_multiple_input<D: ?Sized + AsRef<[u8]>>(
        &mut self,
        data: &D,
        others: &mut [&mut Command]
    ) -> Result<Option<i32>, Error>;
fn execute_multiple_input_output<D: ?Sized + AsRef<[u8]>>(
        &mut self,
        data: &D,
        others: &mut [&mut Command]
    ) -> Result<Output, Error>;
fn execute_multiple_input_reader2<N: ArrayLength<u8> + IsGreaterOrEqual<U1, Output = True>>(
        &mut self,
        reader: &mut dyn Read,
        others: &mut [&mut Command]
    ) -> Result<Option<i32>, Error>;
fn execute_multiple_input_reader_output2<N: ArrayLength<u8> + IsGreaterOrEqual<U1, Output = True>>(
        &mut self,
        reader: &mut dyn Read,
        others: &mut [&mut Command]
    ) -> Result<Output, Error>; fn execute_check_exit_status_code(
        &mut self,
        expected_exit_status_code: i32
    ) -> Result<(), Error> { ... }
fn execute_input_reader(
        &mut self,
        reader: &mut dyn Read
    ) -> Result<Option<i32>, Error> { ... }
fn execute_input_reader_output(
        &mut self,
        reader: &mut dyn Read
    ) -> Result<Output, Error> { ... }
fn execute_multiple_input_reader(
        &mut self,
        reader: &mut dyn Read,
        others: &mut [&mut Command]
    ) -> Result<Option<i32>, Error> { ... }
fn execute_multiple_input_reader_output(
        &mut self,
        reader: &mut dyn Read,
        others: &mut [&mut Command]
    ) -> Result<Output, Error> { ... } }

Required methods

fn execute(&mut self) -> Result<Option<i32>, Error>

Execute this command and get the exit status code. stdout and stderr will be set to Stdio::null(). By default, stdin is inherited from the parent.

fn execute_output(&mut self) -> Result<Output, Error>

Execute this command and get the exit status code. By default, stdin, stdout and stderr are inherited from the parent.

fn execute_input<D: ?Sized + AsRef<[u8]>>(
    &mut self,
    data: &D
) -> Result<Option<i32>, Error>

Execute this command and input in-memory data to the process. stdin will be set to Stdio::piped(). stdout and stderr will be set to Stdio::null().

fn execute_input_output<D: ?Sized + AsRef<[u8]>>(
    &mut self,
    data: &D
) -> Result<Output, Error>

Execute this command and input in-memory data to the process. stdin will be set to Stdio::piped(). By default, stdout and stderr are inherited from the parent.

fn execute_input_reader2<N: ArrayLength<u8> + IsGreaterOrEqual<U1, Output = True>>(
    &mut self,
    reader: &mut dyn Read
) -> Result<Option<i32>, Error>

Execute this command and input data from a reader to the process. stdin will be set to Stdio::piped(). stdout and stderr will be set to Stdio::null().

fn execute_input_reader_output2<N: ArrayLength<u8> + IsGreaterOrEqual<U1, Output = True>>(
    &mut self,
    reader: &mut dyn Read
) -> Result<Output, Error>

Execute this command and input data from a reader to the process. stdin will be set to Stdio::piped(). By default, stdout and stderr are inherited from the parent.

fn execute_multiple(
    &mut self,
    others: &mut [&mut Command]
) -> Result<Option<i32>, Error>

TODO execute_multiple Execute this command as well as other commands and pipe their stdin and stdout, and get the exit status code. The stdout and stderr of the last process will be set to Stdio::null(). By default, the stdin of the first process is inherited from the parent.

fn execute_multiple_output(
    &mut self,
    others: &mut [&mut Command]
) -> Result<Output, Error>

Execute this command as well as other commands and pipe their stdin and stdout. By default, the stdin of the first process, the stdout and stderr of the last process are inherited from the parent.

fn execute_multiple_input<D: ?Sized + AsRef<[u8]>>(
    &mut self,
    data: &D,
    others: &mut [&mut Command]
) -> Result<Option<i32>, Error>

Execute this command as well as other commands and pipe their stdin and stdout, and input in-memory data to the process, and get the exit status code. The stdin of the first process will be set to Stdio::piped(). The stdout and stderr of the last process will be set to Stdio::null().

fn execute_multiple_input_output<D: ?Sized + AsRef<[u8]>>(
    &mut self,
    data: &D,
    others: &mut [&mut Command]
) -> Result<Output, Error>

Execute this command as well as other commands and pipe their stdin and stdout, and input in-memory data to the process. The stdin of the first process will be set to Stdio::piped(). By default, the stdout and stderr of the last process are inherited from the parent.

fn execute_multiple_input_reader2<N: ArrayLength<u8> + IsGreaterOrEqual<U1, Output = True>>(
    &mut self,
    reader: &mut dyn Read,
    others: &mut [&mut Command]
) -> Result<Option<i32>, Error>

Execute this command as well as other commands and pipe their stdin and stdout, and input data from a reader to the process, and get the exit status code. The stdin of the first process will be set to Stdio::piped(). The stdout and stderr of the last process will be set to Stdio::null().

fn execute_multiple_input_reader_output2<N: ArrayLength<u8> + IsGreaterOrEqual<U1, Output = True>>(
    &mut self,
    reader: &mut dyn Read,
    others: &mut [&mut Command]
) -> Result<Output, Error>

Execute this command as well as other commands and pipe their stdin and stdout, and input data from a reader to the process. The stdin of the first process will be set to Stdio::piped(). By default, the stdout and stderr of the last process are inherited from the parent.

Loading content...

Provided methods

fn execute_check_exit_status_code(
    &mut self,
    expected_exit_status_code: i32
) -> Result<(), Error>

Execute this command and check the exit status code. stdout and stderr will be set to Stdio::null(). By default, stdin is inherited from the parent. It's usually used for checking whether the program is correct.

fn execute_input_reader(
    &mut self,
    reader: &mut dyn Read
) -> Result<Option<i32>, Error>

Execute this command and input data from a reader to the process. stdin will be set to Stdio::piped(). stdout and stderr will be set to Stdio::null().

fn execute_input_reader_output(
    &mut self,
    reader: &mut dyn Read
) -> Result<Output, Error>

Execute this command and input data from a reader to the process. stdin will be set to Stdio::piped(). By default, stdout and stderr are inherited from the parent.

fn execute_multiple_input_reader(
    &mut self,
    reader: &mut dyn Read,
    others: &mut [&mut Command]
) -> Result<Option<i32>, Error>

Execute this command as well as other commands and pipe their stdin and stdout, and input data from a reader to the process, and get the exit status code. The stdin of the first process will be set to Stdio::piped(). The stdout and stderr of the last process will be set to Stdio::null().

fn execute_multiple_input_reader_output(
    &mut self,
    reader: &mut dyn Read,
    others: &mut [&mut Command]
) -> Result<Output, Error>

Execute this command as well as other commands and pipe their stdin and stdout, and input data from a reader to the process. The stdin of the first process will be set to Stdio::piped(). By default, the stdout and stderr of the last process are inherited from the parent.

Loading content...

Implementations on Foreign Types

impl Execute for Command[src]

Loading content...

Implementors

Loading content...