pub struct SymHashMap<T>(pub FxHashMap<SymStr, T>);Expand description
A convenience abstraction over a String-keyed HashMap
typically used for HashMap<String,Stored> states.
The goal is to support both a string interface, as well as the interned tickets interface,
while avoiding String allocations internally.
Tuple Fields§
§0: FxHashMap<SymStr, T>Implementations§
Source§impl<T> SymHashMap<T>
impl<T> SymHashMap<T>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, key: &str) -> Option<&T>
pub fn get_sym(&self, key: SymStr) -> Option<&T>
pub fn get_mut(&mut self, key: &str) -> Option<&mut T>
pub fn get_mut_sym(&mut self, key: SymStr) -> Option<&mut T>
pub fn contains_key(&self, key: &str) -> bool
pub fn contains_key_sym(&self, key: &SymStr) -> bool
pub fn insert(&mut self, key: &str, value: T)
pub fn insert_sym(&mut self, key: SymStr, value: T)
pub fn remove(&mut self, key: &str)
pub fn remove_sym(&mut self, key: SymStr)
pub fn keys(&self) -> Keys<'_, SymStr, T> ⓘ
pub fn entry(&mut self, key: &str) -> Entry<'_, SymStr, T>
pub fn entry_sym(&mut self, key: SymStr) -> Entry<'_, SymStr, T>
pub fn iter(&self) -> Iter<'_, SymStr, T> ⓘ
Trait Implementations§
Source§impl<T: Clone> Clone for SymHashMap<T>
impl<T: Clone> Clone for SymHashMap<T>
Source§fn clone(&self) -> SymHashMap<T>
fn clone(&self) -> SymHashMap<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for SymHashMap<T>
impl<T: Debug> Debug for SymHashMap<T>
Source§impl<T> Default for SymHashMap<T>
impl<T> Default for SymHashMap<T>
Source§impl From<SymHashMap<Stored>> for Stored
impl From<SymHashMap<Stored>> for Stored
Source§fn from(value: SymHashMap<Stored>) -> Self
fn from(value: SymHashMap<Stored>) -> Self
Converts to this type from the input type.
Source§impl<T> Index<&SymbolU32> for SymHashMap<T>
impl<T> Index<&SymbolU32> for SymHashMap<T>
Source§impl<'a, T> IntoIterator for &'a SymHashMap<T>
impl<'a, T> IntoIterator for &'a SymHashMap<T>
Source§impl<'a, T> IntoIterator for &'a mut SymHashMap<T>
impl<'a, T> IntoIterator for &'a mut SymHashMap<T>
Source§impl<T> IntoIterator for SymHashMap<T>
impl<T> IntoIterator for SymHashMap<T>
Source§impl IntoPropertiesResult for SymHashMap<Stored>
impl IntoPropertiesResult for SymHashMap<Stored>
Auto Trait Implementations§
impl<T> Freeze for SymHashMap<T>
impl<T> RefUnwindSafe for SymHashMap<T>where
T: RefUnwindSafe,
impl<T> Send for SymHashMap<T>where
T: Send,
impl<T> Sync for SymHashMap<T>where
T: Sync,
impl<T> Unpin for SymHashMap<T>where
T: Unpin,
impl<T> UnsafeUnpin for SymHashMap<T>
impl<T> UnwindSafe for SymHashMap<T>where
T: 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