[−][src]Trait preftool::Configuration
Configuration trait. Configuration is thread safe, and cloneable. Clones should be cheap (default config object consits of cloning an Arc and 3 String instances).
Associated Types
type Section: Configuration
Type used for configuration sections.
type Sections: IntoIterator<Item = Self::Section>
Iterator type used to get child sections.
Required methods
fn get<K: Into<ConfigKey>>(&self, key: K) -> Option<&str>
Get a value from the configuration, if it exists.
fn section<K: Into<ConfigKey>>(&self, key: K) -> Self::Section
Get a sub-section from the configuration. This always returns a section, even if it is empty.
fn sections(&self) -> Self::Sections
Get all child sections of this configuration, as an iterator.
fn key(&self) -> &ConfigKey
Get the current section key.
fn path(&self) -> &ConfigKey
Get the current section path.
fn value(&self) -> Option<&str>
Get the current section value (if any).