Struct smart_config::ConfigRef
source · pub struct ConfigRef<'a> { /* private fields */ }
Expand description
Reference to a specific configuration inside ConfigSchema
.
Implementations§
source§impl<'a> ConfigRef<'a>
impl<'a> ConfigRef<'a>
sourcepub fn metadata(&self) -> &'static ConfigMetadata
pub fn metadata(&self) -> &'static ConfigMetadata
Gets the config metadata.
sourcepub fn is_top_level(&self) -> bool
pub fn is_top_level(&self) -> bool
Checks whether this config is top-level (i.e., was included into the schema directly, rather than as a sub-config).
sourcepub fn aliases(&self) -> impl Iterator<Item = (&'a str, AliasOptions)> + '_
pub fn aliases(&self) -> impl Iterator<Item = (&'a str, AliasOptions)> + '_
Iterates over all aliases for this config.
Trait Implementations§
impl<'a> Copy for ConfigRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for ConfigRef<'a>
impl<'a> !RefUnwindSafe for ConfigRef<'a>
impl<'a> Send for ConfigRef<'a>
impl<'a> Sync for ConfigRef<'a>
impl<'a> Unpin for ConfigRef<'a>
impl<'a> !UnwindSafe for ConfigRef<'a>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)