pub struct CommandEnv {
clear: bool,
saw_path: bool,
vars: BTreeMap<EnvKey, Option<OsString>>,
}
Expand description
Stores a set of changes to an environment
Fields§
§clear: bool
§saw_path: bool
§vars: BTreeMap<EnvKey, Option<OsString>>
Implementations§
Source§impl CommandEnv
impl CommandEnv
pub fn capture(&self) -> BTreeMap<EnvKey, OsString>
pub fn is_unchanged(&self) -> bool
pub fn capture_if_changed(&self) -> Option<BTreeMap<EnvKey, OsString>>
pub fn set(&mut self, key: &OsStr, value: &OsStr)
pub fn remove(&mut self, key: &OsStr)
pub fn clear(&mut self)
pub fn does_clear(&self) -> bool
pub fn have_changed_path(&self) -> bool
fn maybe_saw_path(&mut self, key: &EnvKey)
pub fn iter(&self) -> CommandEnvs<'_> ⓘ
Trait Implementations§
Source§impl Clone for CommandEnv
impl Clone for CommandEnv
Source§fn clone(&self) -> CommandEnv
fn clone(&self) -> CommandEnv
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CommandEnv
impl Debug for CommandEnv
Source§impl Default for CommandEnv
impl Default for CommandEnv
Source§fn default() -> CommandEnv
fn default() -> CommandEnv
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CommandEnv
impl RefUnwindSafe for CommandEnv
impl Send for CommandEnv
impl Sync for CommandEnv
impl Unpin for CommandEnv
impl UnwindSafe for CommandEnv
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)] const IS_ZST: bool = _
#[doc(hidden)] const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const LAYOUT: Layout = _
#[doc(hidden)] const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const MAX_SLICE_LEN: usize = _
#[doc(hidden)] const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)The largest safe length for a
[Self]
. Read more