pub struct CmdEnv { /* private fields */ }
Expand description
Environment for builtin or custom commands.
Implementations§
source§impl CmdEnv
impl CmdEnv
sourcepub fn get_cmd_name(&self) -> &str
pub fn get_cmd_name(&self) -> &str
Returns the name of this command.
sourcepub fn var(&self, key: &str) -> Option<&String>
pub fn var(&self, key: &str) -> Option<&String>
Fetches the environment variable key for this command.
sourcepub fn current_dir(&self) -> &Path
pub fn current_dir(&self) -> &Path
Returns the current working directory for this command.
sourcepub fn stdin(&mut self) -> &mut CmdIn ⓘ
pub fn stdin(&mut self) -> &mut CmdIn ⓘ
Returns a new handle to the standard input for this command.
Auto Trait Implementations§
impl Freeze for CmdEnv
impl RefUnwindSafe for CmdEnv
impl Send for CmdEnv
impl Sync for CmdEnv
impl Unpin for CmdEnv
impl UnwindSafe for CmdEnv
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