pub trait OrEnvExt: Sized {
// Required method
fn or_env_mut(&mut self, env_var: &'static str) -> Result<&mut Self>;
// Provided method
fn or_env(self, env_var: &'static str) -> Result<Self> { ... }
}Required Methods§
Sourcefn or_env_mut(&mut self, env_var: &'static str) -> Result<&mut Self>
fn or_env_mut(&mut self, env_var: &'static str) -> Result<&mut Self>
If the arg is not set, initialize the arg from env by mutating the arg in place. Used to proactively initialize and validate args.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.