Struct config::DefaultConfigurationSection
source · pub struct DefaultConfigurationSection { /* private fields */ }
Available on crate feature
std
only.Expand description
Represent a configuration section.
Implementations§
source§impl DefaultConfigurationSection
impl DefaultConfigurationSection
sourcepub fn new(root: Box<dyn ConfigurationRoot>, path: &str) -> Self
pub fn new(root: Box<dyn ConfigurationRoot>, path: &str) -> Self
Initializes a new configuration section.
Arguments
root
- A reference to theConfigurationRoot
path
- The path of the configuration section
Trait Implementations§
source§impl<'a> AsRef<dyn Configuration + 'a> for DefaultConfigurationSection
impl<'a> AsRef<dyn Configuration + 'a> for DefaultConfigurationSection
source§fn as_ref(&self) -> &(dyn Configuration + 'a)
fn as_ref(&self) -> &(dyn Configuration + 'a)
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<'a> Borrow<dyn Configuration + 'a> for DefaultConfigurationSection
impl<'a> Borrow<dyn Configuration + 'a> for DefaultConfigurationSection
source§fn borrow(&self) -> &(dyn Configuration + 'a)
fn borrow(&self) -> &(dyn Configuration + 'a)
Immutably borrows from an owned value. Read more
source§impl Configuration for DefaultConfigurationSection
impl Configuration for DefaultConfigurationSection
source§fn section(&self, key: &str) -> Box<dyn ConfigurationSection>
fn section(&self, key: &str) -> Box<dyn ConfigurationSection>
Gets a
ConfigurationSection
with the specified key.source§fn children(&self) -> Vec<Box<dyn ConfigurationSection>>
fn children(&self) -> Vec<Box<dyn ConfigurationSection>>
Gets the sequence of
ConfigurationSection
children.source§fn reload_token(&self) -> Box<dyn ChangeToken>
fn reload_token(&self) -> Box<dyn ChangeToken>
Returns a
ChangeToken
that can be used to observe when this configuration is reloaded.source§fn as_section(&self) -> Option<&dyn ConfigurationSection>
fn as_section(&self) -> Option<&dyn ConfigurationSection>
Attempts to convert the
Configuration
as a ConfigurationSection
.Auto Trait Implementations§
impl !RefUnwindSafe for DefaultConfigurationSection
impl !Send for DefaultConfigurationSection
impl !Sync for DefaultConfigurationSection
impl Unpin for DefaultConfigurationSection
impl !UnwindSafe for DefaultConfigurationSection
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<C> ConfigurationBinder for Cwhere
C: AsRef<dyn Configuration>,
impl<C> ConfigurationBinder for Cwhere
C: AsRef<dyn Configuration>,
source§fn reify<T>(&self) -> Twhere
T: DeserializeOwned,
fn reify<T>(&self) -> Twhere
T: DeserializeOwned,
Creates and returns a structure bound to the configuration.
source§fn bind<T>(&self, instance: &mut T)where
T: DeserializeOwned,
fn bind<T>(&self, instance: &mut T)where
T: DeserializeOwned,
Binds the configuration to the specified instance. Read more
source§fn bind_at<T>(&self, key: impl AsRef<str>, instance: &mut T)where
T: DeserializeOwned,
fn bind_at<T>(&self, key: impl AsRef<str>, instance: &mut T)where
T: DeserializeOwned,
Binds the specified configuration section to the provided instance. Read more