[][src]Struct unix::Environ

#[repr(transparent)]pub struct Environ<'a>(pub &'a Nul<&'a Nul<u8>>);

Process environment, conventionally an array of strings of form "key=value"

Implementations

impl<'a> Environ<'a>[src]

pub fn get<'b>(&self, s: &'b [u8]) -> Option<Option<&'a Nul<u8>>>[src]

Get the value of the given environment variable. Returns None if the variable isn't. Returns Some(None) if the variable is, but the entry contains no '=' character.

pub fn get_str<'b>(&self, s: &'b [u8]) -> Option<Option<&'a NulStr>>[src]

Get the value of the given environment variable. Returns None if the variable isn't, or isn't valid UTF-8. Returns Some(None) if the variable is, but the entry contains no '=' character.

Trait Implementations

impl<'a> Clone for Environ<'a>[src]

impl<'a> Copy for Environ<'a>[src]

impl<'a> Debug for Environ<'a>[src]

impl<'a> Eq for Environ<'a>[src]

impl<'a> PartialEq<Environ<'a>> for Environ<'a>[src]

impl<'a> StructuralEq for Environ<'a>[src]

impl<'a> StructuralPartialEq for Environ<'a>[src]

Auto Trait Implementations

impl<'a> Send for Environ<'a>[src]

impl<'a> Sync for Environ<'a>[src]

impl<'a> Unpin for Environ<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> TryClone for T where
    T: Clone
[src]

type Error = Void

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.