pub struct OwnedSection { /* private fields */ }Expand description
Represents an owned configuration section.
Implementations§
Source§impl OwnedSection
impl OwnedSection
Sourcepub fn section(&self, key: &str) -> Section<'_>
pub fn section(&self, key: &str) -> Section<'_>
Gets a configuration subsection in this section.
§Arguments
key- The case-insensitive key of the configuration subsection to get
Sourcepub fn sections(&self) -> Vec<Section<'_>>
pub fn sections(&self) -> Vec<Section<'_>>
Gets all of the subsections in this section.
Trait Implementations§
Source§impl Binder for OwnedSection
Available on crate feature binder only.
impl Binder for OwnedSection
Available on crate feature
binder only.Source§fn reify<T: DeserializeOwned>(&self) -> Result<T>
fn reify<T: DeserializeOwned>(&self) -> Result<T>
Creates and returns a structure reified from the configuration.
Source§fn bind<T: DeserializeOwned>(&self, instance: &mut T) -> Result
fn bind<T: DeserializeOwned>(&self, instance: &mut T) -> Result
Binds the configuration to the specified instance. Read more
Source§fn bind_at<T: DeserializeOwned>(
&self,
key: impl AsRef<str>,
instance: &mut T,
) -> Result
fn bind_at<T: DeserializeOwned>( &self, key: impl AsRef<str>, instance: &mut T, ) -> Result
Binds the specified configuration section to the provided instance. Read more
Source§fn get_value<T: FromStr>(
&self,
key: impl AsRef<str>,
) -> Result<Option<T>, T::Err>
fn get_value<T: FromStr>( &self, key: impl AsRef<str>, ) -> Result<Option<T>, T::Err>
Gets a typed value from the configuration. Read more
Source§fn get_value_or_default<T: FromStr + Default>(
&self,
key: impl AsRef<str>,
) -> Result<T, T::Err>
fn get_value_or_default<T: FromStr + Default>( &self, key: impl AsRef<str>, ) -> Result<T, T::Err>
Gets an optional, typed value from the configuration. Read more
Source§fn reify_unchecked<T: DeserializeOwned>(&self) -> T
fn reify_unchecked<T: DeserializeOwned>(&self) -> T
Creates and returns a structure reified from the configuration. Read more
Source§fn bind_unchecked<T: DeserializeOwned>(&self, instance: &mut T)
fn bind_unchecked<T: DeserializeOwned>(&self, instance: &mut T)
Binds the configuration to the specified instance. Read more
Source§fn bind_at_unchecked<T: DeserializeOwned>(
&self,
key: impl AsRef<str>,
instance: &mut T,
)
fn bind_at_unchecked<T: DeserializeOwned>( &self, key: impl AsRef<str>, instance: &mut T, )
Binds the specified configuration section to the provided instance. Read more
Source§impl Clone for OwnedSection
impl Clone for OwnedSection
Source§fn clone(&self) -> OwnedSection
fn clone(&self) -> OwnedSection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OwnedSection
impl Debug for OwnedSection
Source§impl Display for OwnedSection
impl Display for OwnedSection
Source§impl Reloadable for OwnedSection
impl Reloadable for OwnedSection
Source§fn can_reload(&self) -> bool
fn can_reload(&self) -> bool
Gets a value indicating whether the configuration can be reloaded.
Source§fn reload_token(&self) -> impl ChangeToken + 'static
fn reload_token(&self) -> impl ChangeToken + 'static
Gets a change token that will be notified when the configuration is reloaded.
Auto Trait Implementations§
impl Freeze for OwnedSection
impl !RefUnwindSafe for OwnedSection
impl Send for OwnedSection
impl Sync for OwnedSection
impl Unpin for OwnedSection
impl UnsafeUnpin for OwnedSection
impl !UnwindSafe for OwnedSection
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