Struct EnvMap

Source
pub struct EnvMap { /* private fields */ }

Implementations§

Source§

impl EnvMap

Source

pub fn new(inner: HashMap<OsString, OsString>) -> Self

Trait Implementations§

Source§

impl Debug for EnvMap

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EnvMap

Source§

fn default() -> EnvMap

Returns the “default value” for a type. Read more
Source§

impl<K, V> FromIterator<(K, V)> for EnvMap
where K: Into<OsString>, V: Into<OsString>,

Source§

fn from_iter<I: IntoIterator<Item = (K, V)>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl Read for EnvMap

Source§

fn get<K>(&self, key: K) -> Option<OsString>
where K: AsRef<OsStr>,

Get value from environment. Read more
Source§

impl Write for EnvMap

Source§

fn set<K, V>(&self, key: K, value: V)
where K: AsRef<OsStr>, V: AsRef<OsStr>,

Set value for environment.

Auto Trait Implementations§

§

impl Freeze for EnvMap

§

impl !RefUnwindSafe for EnvMap

§

impl Send for EnvMap

§

impl Sync for EnvMap

§

impl Unpin for EnvMap

§

impl !UnwindSafe for EnvMap

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<E> GetInput for E
where E: Read,

Source§

fn get_input(&self, name: impl AsRef<OsStr>) -> Option<OsString>

Gets the raw value of an input.
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<E> ParseInput for E
where E: Read,

Source§

fn parse_input<T>( &self, name: impl AsRef<OsStr>, ) -> Result<Option<T>, <T as Parse>::Error>
where T: Parse,

Parse the value of an input. Read more
Source§

impl<E> SetInput for E
where E: Write,

Source§

fn set_input(&self, name: impl AsRef<OsStr>, value: impl AsRef<OsStr>)

Sets an input.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.