Struct CommandEnv
pub struct CommandEnv { pub(in ::sys::process::env) clear: bool, pub(in ::sys::process::env) saw_path: bool, pub(in ::sys::process::env) vars: BTreeMap<EnvKey, Option<OsString>> }
Stores a set of changes to an environment
Fields
clear: boolsaw_path: boolvars: BTreeMap<EnvKey, Option<OsString>>
Implementations
impl CommandEnv
fn capture(&self) -> BTreeMap<EnvKey, OsString>fn is_unchanged(&self) -> boolfn capture_if_changed(&self) -> Option<BTreeMap<EnvKey, OsString>>fn set(&mut self, key: &OsStr, value: &OsStr)fn remove(&mut self, key: &OsStr)fn clear(&mut self)fn does_clear(&self) -> boolfn have_changed_path(&self) -> boolfn maybe_saw_path(&mut self, key: &EnvKey)fn iter(&self) -> CommandEnvs<'_>
Trait Implementations
impl Clone for CommandEnv
fn clone(&self) -> CommandEnv
impl Debug for CommandEnv
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for CommandEnv
fn default() -> CommandEnv
Auto Trait Implementations
impl Freeze for CommandEnv
impl RefUnwindSafe for CommandEnv
impl Send for CommandEnv
impl Sync for CommandEnv
impl Unpin for CommandEnv
impl UnsafeUnpin for CommandEnv
impl UnwindSafe for CommandEnv
Blanket Implementations
impl<T> Any for CommandEnv
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for CommandEnv
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for CommandEnv
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for CommandEnv
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for CommandEnv
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for CommandEnv
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for CommandEnv
impl<T> ToOwned for CommandEnv
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for CommandEnv
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for CommandEnv
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for CommandEnv
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>