pub struct BasicCmd { /* private fields */ }
Expand description
A basic command is a parsed form of for example
cat < in.txt
, ortee file.txt
, orwc -l > out.txt
insidecat < in.txt | tee file.txt | wc -l > out.txt &
.
Implementations§
Source§impl BasicCmd
impl BasicCmd
Sourcepub fn executable(&self) -> &str
pub fn executable(&self) -> &str
Getter for executable.
Sourcepub fn in_red_path(&self) -> &Option<String>
pub fn in_red_path(&self) -> &Option<String>
Getter for in_red_path.
Sourcepub fn out_red_path(&self) -> &Option<String>
pub fn out_red_path(&self) -> &Option<String>
Getter for in_red_path.
Sourcepub fn is_in_middle(&self) -> bool
pub fn is_in_middle(&self) -> bool
Getter for is_in_middle.
Sourcepub fn args_to_c_argv(&self) -> *const *const c_char
pub fn args_to_c_argv(&self) -> *const *const c_char
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().
Sourcepub fn executable_cstring(&self) -> CString
pub fn executable_cstring(&self) -> CString
Constructs a CString for executable.
Sourcepub fn out_red_path_cstring(&self) -> Option<CString>
pub fn out_red_path_cstring(&self) -> Option<CString>
Constructs a CString for out_red_path.
Sourcepub fn in_red_path_cstring(&self) -> Option<CString>
pub fn in_red_path_cstring(&self) -> Option<CString>
Constructs a CString for in_red_path.
Trait Implementations§
Source§impl Builder<BasicCmd> for BasicCmdBuilder
impl Builder<BasicCmd> for BasicCmdBuilder
Auto Trait Implementations§
impl Freeze for BasicCmd
impl RefUnwindSafe for BasicCmd
impl Send for BasicCmd
impl Sync for BasicCmd
impl Unpin for BasicCmd
impl UnwindSafe for BasicCmd
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