ConfigLoader

Trait ConfigLoader 

Source
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§

Source

fn from_env() -> ConfigResult<Self>

Load configuration from environment variables

Provided Methods§

Source

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.

Implementors§