pub struct ConfigLayer { /* private fields */ }Expand description
A single configuration layer mapping string keys to string values.
Implementations§
Source§impl ConfigLayer
impl ConfigLayer
pub fn new(name: &str) -> Self
pub fn name(&self) -> &str
pub fn set(&mut self, key: &str, value: &str)
pub fn get(&self, key: &str) -> Option<&str>
pub fn remove(&mut self, key: &str) -> bool
pub fn contains(&self, key: &str) -> bool
pub fn count(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn keys(&self) -> Vec<&str>
pub fn clear(&mut self)
Trait Implementations§
Source§impl Clone for ConfigLayer
impl Clone for ConfigLayer
Source§fn clone(&self) -> ConfigLayer
fn clone(&self) -> ConfigLayer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConfigLayer
impl Debug for ConfigLayer
Source§impl Default for ConfigLayer
impl Default for ConfigLayer
Source§fn default() -> ConfigLayer
fn default() -> ConfigLayer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConfigLayer
impl RefUnwindSafe for ConfigLayer
impl Send for ConfigLayer
impl Sync for ConfigLayer
impl Unpin for ConfigLayer
impl UnsafeUnpin for ConfigLayer
impl UnwindSafe for ConfigLayer
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