pub trait ConfigLoader: Sized {
// Required method
fn from_env() -> ConfigResult<Self>;
// Provided method
fn validate(&self) -> ConfigResult<()> { ... }
}Expand description
Trait for types that can be loaded from environment variables
Required Methods§
Sourcefn from_env() -> ConfigResult<Self>
fn from_env() -> ConfigResult<Self>
Load configuration from environment variables
Provided Methods§
Sourcefn validate(&self) -> ConfigResult<()>
fn validate(&self) -> ConfigResult<()>
Validate the configuration
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.