pub trait Configuration {
    fn get(&self, key: &str) -> Option<&str>;
    fn section(&self, key: &str) -> Box<dyn ConfigurationSection>;
    fn children(&self) -> Vec<Box<dyn ConfigurationSection>>;
    fn reload_token(&self) -> Box<dyn ChangeToken>;
    fn iter_relative(
        &self,
        make_paths_relative: bool
    ) -> Box<dyn Iterator<Item = (String, String)>>; fn as_section(&self) -> Option<&dyn ConfigurationSection> { ... } fn iter(&self) -> Box<dyn Iterator<Item = (String, String)>> { ... } }
Expand description

Defines the behavior of a configuration.

Required Methods

Gets the configuration value.

Arguments
  • key - The configuration key

Gets a configuration section with the specified key.

Gets the sequence of child configuration sections.

Returns a change token that can be used to observe when this configuration is reloaded.

Gets an iterator of the key/value pairs within the configuration.

Arguments
  • make_paths_relative - If true, the child keys returned will have the current configuration’s path trimmed from the front

Provided Methods

Attempts to convert the configuration as a configuration section.

Gets an iterator of the key/value pairs within the configuration.

Implementors