Struct config::Config
[−]
[src]
pub struct Config { /* fields omitted */ }
Methods
impl Config
[src]
fn new() -> Self
fn merge<T>(&mut self, source: T) -> Result<(), Box<Error>> where T: SourceBuilder
Merge in configuration values from the given source.
fn set_default<T>(&mut self, key: &str, value: T) -> Result<(), Box<Error>> where T: Into<Value>
Sets the default value for this key. The default value is only used when no other value is provided.
fn set<T>(&mut self, key: &str, value: T) -> Result<(), Box<Error>> where T: Into<Value>
Sets an override for this key.
fn refresh(&mut self) -> Result<(), Box<Error>>
Refresh the configuration cache with fresh data from associated sources.
Configuration is automatically refreshed after a mutation
operation (set
, merge
, set_default
, etc.).