pub struct HashTable<T: HTEntry> { /* private fields */ }Implementations§
Source§impl<T: HTFromKey> HashTable<T>
impl<T: HTFromKey> HashTable<T>
Source§impl<T: HTEntry> HashTable<T>
impl<T: HTEntry> HashTable<T>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn has<K>(&self, key: &K) -> bool
Sourcepub fn find<K>(&self, key: &K) -> Option<&T>
pub fn find<K>(&self, key: &K) -> Option<&T>
Finds a reference to the value corresponding to the key
or returns None if the key is not present in the table.
Sourcepub fn find_mut<K>(&mut self, key: &K) -> Option<&mut T>
pub fn find_mut<K>(&mut self, key: &K) -> Option<&mut T>
Finds a mutable reference to the value corresponding to the key
or returns None if the key is not present in the table.
pub fn insert(&mut self, item: T)
pub fn extract_if<'a, F>(&'a mut self, f: F) -> impl Iterator<Item = T> + 'a
pub fn remove<K>(&mut self, key: &K) -> Option<T>
pub fn find_entry<K>( &mut self, key: &K, ) -> Result<OccupiedEntry<'_, T>, AbsentEntry<'_, T>>
pub fn entry<K>(&mut self, key: &K) -> Entry<'_, T>
pub fn iter(&self) -> Iter<'_, T>
pub fn iter_mut(&mut self) -> IterMut<'_, T>
pub fn first_key(&self) -> Option<T::Key>
Trait Implementations§
Source§impl<'a, T: HTEntry> IntoIterator for &'a HashTable<T>
impl<'a, T: HTEntry> IntoIterator for &'a HashTable<T>
Source§impl<'a, T: HTEntry> IntoIterator for &'a mut HashTable<T>
impl<'a, T: HTEntry> IntoIterator for &'a mut HashTable<T>
Source§impl<T: HTEntry> IntoIterator for HashTable<T>
impl<T: HTEntry> IntoIterator for HashTable<T>
Auto Trait Implementations§
impl<T> Freeze for HashTable<T>
impl<T> RefUnwindSafe for HashTable<T>where
T: RefUnwindSafe,
impl<T> Send for HashTable<T>where
T: Send,
impl<T> Sync for HashTable<T>where
T: Sync,
impl<T> Unpin for HashTable<T>where
T: Unpin,
impl<T> UnsafeUnpin for HashTable<T>
impl<T> UnwindSafe for HashTable<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