Skip to main content

EnvSource

Trait EnvSource 

Source
pub trait EnvSource {
    // Required method
    fn var(&self, key: &str) -> Option<OsString>;
}
Expand description

A source of environment variables, so resolution can be tested without touching the real process environment.

Required Methods§

Source

fn var(&self, key: &str) -> Option<OsString>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<S: AsRef<str>> EnvSource for [(S, S)]

Source§

fn var(&self, key: &str) -> Option<OsString>

Implementors§