Skip to main content

EnvSource

Trait EnvSource 

Source
pub trait EnvSource: Send + Sync {
    // Required method
    fn get(&self, name: &str) -> Option<String>;

    // Provided method
    fn contains(&self, name: &str) -> bool { ... }
}
Expand description

Source for environment variables.

Required Methods§

Source

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

Get an environment variable value.

Provided Methods§

Source

fn contains(&self, name: &str) -> bool

Check if a variable exists.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§