pub struct Env(_);
Expand description
Environment data for a Cmd
.
Implementations§
source§impl Env
impl Env
sourcepub fn from_vec<K: ToString, V: ToString>(kvs: Vec<(K, V)>) -> Self
pub fn from_vec<K: ToString, V: ToString>(kvs: Vec<(K, V)>) -> Self
Constructs a new container from a Vec
.
sourcepub fn one<K: ToString, V: ToString>(k: K, v: V) -> Self
pub fn one<K: ToString, V: ToString>(k: K, v: V) -> Self
Constructs a new container with one entry.
sourcepub fn parent() -> Self
pub fn parent() -> Self
Constructs a new container with data from an environment of the current process.
sourcepub fn insert<K: ToString, V: ToString>(self, k: K, v: V) -> Self
pub fn insert<K: ToString, V: ToString>(self, k: K, v: V) -> Self
Inserts one entry into existing container by mutating it.
sourcepub fn insert_cloned<K: ToString, V: ToString>(&self, k: K, v: V) -> Self
pub fn insert_cloned<K: ToString, V: ToString>(&self, k: K, v: V) -> Self
Inserts one entry into container by mutating it.
sourcepub fn extend_cloned(&self, env: Self) -> Self
pub fn extend_cloned(&self, env: Self) -> Self
Merges two containers and returns a new cloned one. Doesn’t mutate a receiver.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Env
impl Send for Env
impl Sync for Env
impl Unpin for Env
impl UnwindSafe for Env
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