Struct config::DefaultConfigurationRoot
source · [−]pub struct DefaultConfigurationRoot { /* private fields */ }Expand description
Represents the root of a configuration.
Implementations
sourceimpl DefaultConfigurationRoot
impl DefaultConfigurationRoot
sourcepub fn new(providers: Vec<Box<dyn ConfigurationProvider>>) -> Self
pub fn new(providers: Vec<Box<dyn ConfigurationProvider>>) -> Self
Initializes a new root configuration.
Arguments
providers- The list of configuration providers used in the configuration
Trait Implementations
sourceimpl Clone for DefaultConfigurationRoot
impl Clone for DefaultConfigurationRoot
sourcefn clone(&self) -> DefaultConfigurationRoot
fn clone(&self) -> DefaultConfigurationRoot
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Configuration for DefaultConfigurationRoot
impl Configuration for DefaultConfigurationRoot
sourcefn section(&self, key: &str) -> Box<dyn ConfigurationSection>
fn section(&self, key: &str) -> Box<dyn ConfigurationSection>
Gets a configuration section with the specified key.
sourcefn children(&self) -> Vec<Box<dyn ConfigurationSection>>
fn children(&self) -> Vec<Box<dyn ConfigurationSection>>
Gets the sequence of child configuration sections.
sourcefn reload_token(&self) -> Box<dyn ChangeToken>
fn reload_token(&self) -> Box<dyn ChangeToken>
Returns a change token that can be used to observe when this configuration is reloaded.
sourcefn iter_relative(
&self,
make_paths_relative: bool
) -> Box<dyn Iterator<Item = (String, String)>>
fn iter_relative(
&self,
make_paths_relative: bool
) -> Box<dyn Iterator<Item = (String, String)>>
Gets an iterator of the key/value pairs within the configuration. Read more
sourcefn as_section(&self) -> Option<&dyn ConfigurationSection>
fn as_section(&self) -> Option<&dyn ConfigurationSection>
Attempts to convert the configuration as a configuration section.
sourceimpl ConfigurationRoot for DefaultConfigurationRoot
impl ConfigurationRoot for DefaultConfigurationRoot
sourcefn reload(&mut self)
fn reload(&mut self)
Force the configuration values to be reloaded from the underlying provider.
sourcefn providers(&self) -> &[Box<dyn ConfigurationProvider>]
fn providers(&self) -> &[Box<dyn ConfigurationProvider>]
Gets the providers for this configuration.
sourcefn as_config(&self) -> Box<dyn Configuration>
fn as_config(&self) -> Box<dyn Configuration>
Converts the ConfigurationRoot into a Configuration.
sourceimpl Debug for DefaultConfigurationRoot
impl Debug for DefaultConfigurationRoot
sourcefn fmt(&self, formatter: &mut Formatter<'_>) -> FormatResult
fn fmt(&self, formatter: &mut Formatter<'_>) -> FormatResult
Formats the value using the given formatter. Read more
sourceimpl Deref for DefaultConfigurationRoot
impl Deref for DefaultConfigurationRoot
type Target = dyn Configuration + 'static
type Target = dyn Configuration + 'static
The resulting type after dereferencing.
Auto Trait Implementations
impl !RefUnwindSafe for DefaultConfigurationRoot
impl !Send for DefaultConfigurationRoot
impl !Sync for DefaultConfigurationRoot
impl Unpin for DefaultConfigurationRoot
impl !UnwindSafe for DefaultConfigurationRoot
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more