pub struct CmdEnv { /* private fields */ }Expand description
Environment for builtin or custom commands
Implementations§
Source§impl CmdEnv
impl CmdEnv
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) -> impl Read + '_
pub fn stdin(&mut self) -> impl Read + '_
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