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: bool
saw_path: bool
vars: BTreeMap<EnvKey, Option<OsString>>

Implementations

impl CommandEnv

fn capture(&self) -> BTreeMap<EnvKey, OsString>
fn is_unchanged(&self) -> bool
fn 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) -> bool
fn have_changed_path(&self) -> bool
fn 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) -> T

Returns the argument unchanged.

impl<T> SizeHint for CommandEnv where T: ?Sized,

fn lower_bound(&self) -> usize
fn 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) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for CommandEnv where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses 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>