pub struct DogConfig { /* private fields */ }Implementations§
Source§impl DogConfig
impl DogConfig
Sourcepub fn set<K, V>(&mut self, key: K, value: V)
pub fn set<K, V>(&mut self, key: K, value: V)
Set a configuration key to a string value.
Example: app.set(“paginate.default”, “10”)
Sourcepub fn get(&self, key: &str) -> Option<&str>
pub fn get(&self, key: &str) -> Option<&str>
Get a configuration value by key.
Returns None if the key is not present.
pub fn snapshot(&self) -> DogConfigSnapshot
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DogConfig
impl RefUnwindSafe for DogConfig
impl Send for DogConfig
impl Sync for DogConfig
impl Unpin for DogConfig
impl UnwindSafe for DogConfig
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