config

Trait Source

Source
pub trait Source: Debug {
    // Required methods
    fn clone_into_box(&self) -> Box<dyn Source + Send + Sync>;
    fn collect(&self) -> Result<Map<String, Value>, ConfigError>;

    // Provided method
    fn collect_to(&self, cache: &mut Value) -> Result<(), ConfigError> { ... }
}
Expand description

Describes a generic source of configuration properties.

Required Methods§

Source

fn clone_into_box(&self) -> Box<dyn Source + Send + Sync>

Source

fn collect(&self) -> Result<Map<String, Value>, ConfigError>

Collect all configuration properties available from this source and return a Map.

Provided Methods§

Source

fn collect_to(&self, cache: &mut Value) -> Result<(), ConfigError>

Collects all configuration properties to a provided cache.

Trait Implementations§

Source§

impl Clone for Box<dyn Source + Send + Sync>

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementations on Foreign Types§

Source§

impl Source for Vec<Box<dyn Source + Send + Sync>>

Source§

impl Source for [Box<dyn Source + Send + Sync>]

Source§

impl<T> Source for Vec<T>
where T: Source + Sync + Send + Clone + 'static,

Implementors§

Source§

impl Source for Config

Source§

impl Source for Environment

Source§

impl<T, F> Source for File<T, F>
where F: FileStoredFormat + Debug + Clone + Send + Sync + 'static, T: Sync + Send + FileSource<F> + 'static,