pub trait EnvironmentProvider: Send + Sync {
// Required method
fn get_var(&self, key: &str) -> Option<String>;
// Provided method
fn has_var(&self, key: &str) -> bool { ... }
}Expand description
Environment variable provider trait.
This trait abstracts environment variable access, allowing for mock implementations to be injected during testing.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".