pub struct Config { /* private fields */ }Expand description
Resolved configuration values from the functional API.
Contains all parsed configuration values accessible by key name. Values are stored as strings and can be retrieved with type conversion.
Implementations§
Source§impl Config
impl Config
Sourcepub fn get(&self, key: &str) -> String
pub fn get(&self, key: &str) -> String
Get a configuration value as a string. Returns empty string if the key is not found.
Sourcepub fn get_int(&self, key: &str, default: i64) -> i64
pub fn get_int(&self, key: &str, default: i64) -> i64
Get a configuration value as an integer. Returns the default if the key is not found or cannot be parsed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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