pub struct ConfigValue<'a> { /* private fields */ }
Expand description
Ergonomic wrapper for accessing configuration values
Implementations§
Source§impl<'a> ConfigValue<'a>
impl<'a> ConfigValue<'a>
Sourcepub fn as_string_or(&self, default: &str) -> String
pub fn as_string_or(&self, default: &str) -> String
Get as string with custom default
Sourcepub fn as_integer(&self) -> Result<i64>
pub fn as_integer(&self) -> Result<i64>
Get as integer with default fallback
Sourcepub fn as_integer_or(&self, default: i64) -> i64
pub fn as_integer_or(&self, default: i64) -> i64
Get as integer with custom default
Sourcepub fn as_bool_or(&self, default: bool) -> bool
pub fn as_bool_or(&self, default: bool) -> bool
Get as boolean with custom default
Auto Trait Implementations§
impl<'a> Freeze for ConfigValue<'a>
impl<'a> RefUnwindSafe for ConfigValue<'a>
impl<'a> Send for ConfigValue<'a>
impl<'a> Sync for ConfigValue<'a>
impl<'a> Unpin for ConfigValue<'a>
impl<'a> UnwindSafe for ConfigValue<'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