pub struct MetaLibExtMap<V> {
pub data: HashMap<String, V>,
pub default_key: Option<String>,
}Expand description
An extended map for MetaLib keys to values.
Fields§
§data: HashMap<String, V>§default_key: Option<String>Implementations§
Source§impl<V: Clone + Default> MetaLibExtMap<V>
impl<V: Clone + Default> MetaLibExtMap<V>
pub fn new() -> Self
pub fn insert(&mut self, key: &str, value: V)
pub fn get(&self, key: &str) -> Option<&V>
pub fn get_or_default(&self, key: &str) -> V
pub fn contains(&self, key: &str) -> bool
pub fn remove(&mut self, key: &str) -> Option<V>
pub fn size(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn set_default(&mut self, key: &str)
pub fn keys_sorted(&self) -> Vec<&String>
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for MetaLibExtMap<V>
impl<V> RefUnwindSafe for MetaLibExtMap<V>where
V: RefUnwindSafe,
impl<V> Send for MetaLibExtMap<V>where
V: Send,
impl<V> Sync for MetaLibExtMap<V>where
V: Sync,
impl<V> Unpin for MetaLibExtMap<V>where
V: Unpin,
impl<V> UnsafeUnpin for MetaLibExtMap<V>
impl<V> UnwindSafe for MetaLibExtMap<V>where
V: UnwindSafe,
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