pub struct ConfigEntry<'cfg> { /* private fields */ }Expand description
A struct representing a certain entry owned by a Config instance.
An entry has a name, a value, and a level it applies to.
Implementations§
Source§impl<'cfg> ConfigEntry<'cfg>
impl<'cfg> ConfigEntry<'cfg>
Sourcepub fn name(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
Gets the name of this entry.
May return None if the name is not valid utf-8
Sourcepub fn name_bytes(&self) -> &[u8] ⓘ
pub fn name_bytes(&self) -> &[u8] ⓘ
Gets the name of this entry as a byte slice.
Sourcepub fn value(&self) -> Option<&str>
pub fn value(&self) -> Option<&str>
Gets the value of this entry.
May return None if the value is not valid utf-8
§Panics
Panics when no value is defined.
Sourcepub fn value_bytes(&self) -> &[u8] ⓘ
pub fn value_bytes(&self) -> &[u8] ⓘ
Sourcepub fn has_value(&self) -> bool
pub fn has_value(&self) -> bool
Returns true when a value is defined otherwise false.
No value defined is a short-hand to represent a Boolean true.
Sourcepub fn level(&self) -> ConfigLevel
pub fn level(&self) -> ConfigLevel
Gets the configuration level of this entry.
Sourcepub fn include_depth(&self) -> u32
pub fn include_depth(&self) -> u32
Depth of includes where this variable was found
Trait Implementations§
Auto Trait Implementations§
impl<'cfg> Freeze for ConfigEntry<'cfg>
impl<'cfg> RefUnwindSafe for ConfigEntry<'cfg>
impl<'cfg> !Send for ConfigEntry<'cfg>
impl<'cfg> !Sync for ConfigEntry<'cfg>
impl<'cfg> Unpin for ConfigEntry<'cfg>
impl<'cfg> UnwindSafe for ConfigEntry<'cfg>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more