pub struct ChainMap { /* private fields */ }Expand description
A chain of maps where lookup falls through parent layers.
Implementations§
Source§impl ChainMap
impl ChainMap
pub fn new() -> Self
pub fn push_layer(&mut self)
pub fn pop_layer(&mut self) -> bool
pub fn layer_count(&self) -> usize
pub fn set(&mut self, key: &str, value: &str)
pub fn get(&self, key: &str) -> Option<&str>
pub fn contains_key(&self, key: &str) -> bool
pub fn remove_from_top(&mut self, key: &str) -> bool
pub fn top_layer_count(&self) -> usize
pub fn total_entries(&self) -> usize
pub fn all_keys(&self) -> Vec<String>
pub fn flatten(&self) -> HashMap<String, String>
pub fn clear_top(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChainMap
impl RefUnwindSafe for ChainMap
impl Send for ChainMap
impl Sync for ChainMap
impl Unpin for ChainMap
impl UnsafeUnpin for ChainMap
impl UnwindSafe for ChainMap
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