Struct cmd_lib::CmdEnv[][src]

pub struct CmdEnv { /* fields omitted */ }

Environment for builtin or custom commands

Implementations

impl CmdEnv[src]

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

Returns the arguments for this command

pub fn var(&self, key: &str) -> Option<&String>[src]

Fetches the environment variable key for this command

pub fn current_dir(&self) -> &Path[src]

Returns the current working directory for this command

pub fn stdin(&mut self) -> impl Read + '_[src]

Returns a new handle to the standard input for this command

pub fn stdout(&mut self) -> impl Write + '_[src]

Returns a new handle to the standard output for this command

pub fn stderr(&mut self) -> impl Write + '_[src]

Returns a new handle to the standard error for this command

Auto Trait Implementations

impl RefUnwindSafe for CmdEnv

impl Send for CmdEnv

impl Sync for CmdEnv

impl Unpin for CmdEnv

impl UnwindSafe for CmdEnv

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.