pub trait ConfigInit {
    fn parse_options(options: ConfigOptions) -> Result<Self, Error>
    where
        Self: Sized
; fn get_command() -> Command; fn parse() -> Result<Self, Error>
    where
        Self: Sized
, { ... } }
Expand description

Config trait that constructs an instance of itself from environment, command line and configuration files.

Don’t implement the trait manually, invoking #[config] is the only correct way to derive this trait.

Required Methods§

Takes all the environment and tries to build an instance according to the options and the structure attributes.

Build clap::Command that can initialize the annotated struct.

Provided Methods§

Takes all the environment and tries to build an instance according to the structure attributes.

Implementors§