Skip to main content

Options

Trait Options 

Source
pub trait Options: LogOptions {
    // Required methods
    fn load() -> Self;
    fn config_path<'a>(&'a self) -> Cow<'a, Path>;
}
Expand description

Trait required for loading CLI options

Required Methods§

Source

fn load() -> Self

Parse options and return them

Implementers should use the die! macro to handle failure.

Source

fn config_path<'a>(&'a self) -> Cow<'a, Path>

Get the path to a config file

This method is needed since Config::load is expected to be generic.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§