Trait ConfigGet

pub trait ConfigGet {
    // Required methods
    fn get<T>(&self, key: &str) -> Result<T, Error>
       where T: DeserializeOwned;
    fn get_local<T>(&self, key: &str) -> Result<T, Error>
       where T: DeserializeOwned;
    fn get_system_default<T>(&self, key: &str) -> Result<T, Error>
       where T: DeserializeOwned;
}

Required Methods§

fn get<T>(&self, key: &str) -> Result<T, Error>

Get a configuration value

Fallback to the system default if a local user override is not defined.

fn get_local<T>(&self, key: &str) -> Result<T, Error>

Get a locally-defined configuration value from the user’s local config.

fn get_system_default<T>(&self, key: &str) -> Result<T, Error>

Get the system-defined default configuration value.

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§