Skip to main content

Env

Trait Env 

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

Source of environment variables, injectable for tests.

Required Methods§

Source

fn var(&self, name: &str) -> Option<String>

Returns the value of the environment variable name, if set.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§