Skip to main content

Env

Trait Env 

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

Where ${env:NAME} reads from.

A trait rather than a direct std::env::var call so that resolution never touches process state; ProcessEnv is the one implementation that does.

Required Methods§

Source

fn lookup(&self, name: &str) -> Option<EnvValue>

The variable, or None if it is unset.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§