pub struct Config { /* private fields */ }Implementations§
Source§impl Config
impl Config
pub fn new() -> Self
pub fn from_env(prefix: &str) -> Self
pub fn set(&mut self, key: impl Into<String>, value: impl Into<String>)
pub fn get(&self, key: &str) -> Option<&str>
pub fn get_or(&self, key: &str, default: &str) -> String
pub fn get_u64(&self, key: &str) -> Option<u64>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn keys(&self) -> impl Iterator<Item = &str>
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