[][src]Struct unix_exec_piper::BasicCmd

pub struct BasicCmd { /* fields omitted */ }

A basic command is a parsed form of for example

  • cat < in.txt, or
  • tee file.txt, or
  • wc -l > out.txt inside cat < in.txt | tee file.txt | wc -l > out.txt &.

Implementations

impl BasicCmd[src]

pub fn executable(&self) -> &str[src]

Getter for executable.

pub fn args(&self) -> &Vec<String>[src]

Getter for args.

pub fn in_red_path(&self) -> &Option<String>[src]

Getter for in_red_path.

pub fn out_red_path(&self) -> &Option<String>[src]

Getter for in_red_path.

pub fn is_first(&self) -> bool[src]

Getter for is_first.

pub fn is_last(&self) -> bool[src]

Getter for is_last.

pub fn is_in_middle(&self) -> bool[src]

Getter for is_in_middle.

pub fn args_to_c_argv(&self) -> *const *const c_char[src]

Constructs the null-terminated argv-array on the heap. Memory must be freed theoretically in order to have proper memory management but because the address space content is replaced after "exec()" you don't have to free it in case of successful exec().

pub fn executable_cstring(&self) -> CString[src]

Constructs a CString for executable.

pub fn out_red_path_cstring(&self) -> Option<CString>[src]

Constructs a CString for out_red_path.

pub fn in_red_path_cstring(&self) -> Option<CString>[src]

Constructs a CString for in_red_path.

Trait Implementations

impl Builder<BasicCmd> for BasicCmdBuilder[src]

fn build(self) -> BasicCmd[src]

Builds a BasicCmd-object, if self is valid.

impl Debug for BasicCmd[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.