[][src]Struct hash_table::HashTable

pub struct HashTable<K: Eq + Hash, T, Hs: IndexMut<usize, Output = usize> + Index<RangeFull, Output = [usize]>, Es: IndexMut<usize, Output = Slot<(K, T)>>, H: Clone + Hasher = DefaultHasher> { /* fields omitted */ }

Implementations

impl<K: Eq + Hash, T, Hs: IndexMut<usize, Output = usize> + Index<RangeFull, Output = [usize]>, Es: IndexMut<usize, Output = Slot<(K, T)>>, H: Clone + Hasher> HashTable<K, T, Hs, Es, H>[src]

pub fn from_parts(hashes: Hs, elems: Es, hasher: H) -> Self[src]

pub fn find_with_ix<Q: ?Sized>(&self, k: &Q) -> Option<(usize, &K, &T)> where
    K: Borrow<Q>,
    Q: Eq + Hash
[src]

pub fn find_mut_with_ix<Q: ?Sized>(
    &mut self,
    k: &Q
) -> Option<(usize, &K, &mut T)> where
    K: Borrow<Q>,
    Q: Eq + Hash
[src]

pub fn find<Q: ?Sized>(&self, k: &Q) -> Option<(&K, &T)> where
    K: Borrow<Q>,
    Q: Eq + Hash
[src]

pub fn find_mut<Q: ?Sized>(&mut self, k: &Q) -> Option<(&K, &mut T)> where
    K: Borrow<Q>,
    Q: Eq + Hash
[src]

pub fn insert_with<F: FnOnce(Option<T>) -> T>(
    &mut self,
    k: K,
    f: F
) -> Result<(usize, &K, &mut T), (K, F)>
[src]

pub fn insert_with_ix(
    &mut self,
    k: K,
    x: T
) -> Result<(usize, Option<T>), (K, T)>
[src]

pub fn insert(&mut self, k: K, x: T) -> Result<Option<T>, (K, T)>[src]

pub fn delete<Q: ?Sized>(&mut self, k: &Q) -> Option<T> where
    K: Borrow<Q>,
    Q: Eq + Hash
[src]

pub fn drain(&mut self) -> Drain<'_, K, T>[src]

pub fn drain_filter<F: FnMut(&K, &mut T) -> bool>(
    &mut self,
    f: F
) -> DrainFilter<'_, K, T, F>

Notable traits for DrainFilter<'a, K, T, F>

impl<'a, K, T, F: FnMut(&K, &mut T) -> bool> Iterator for DrainFilter<'a, K, T, F> type Item = (K, T);
[src]

pub fn iter_with_ix(&self) -> IterWithIx<'_, K, T>

Notable traits for IterWithIx<'a, K, T>

impl<'a, K: 'a, T: 'a> Iterator for IterWithIx<'a, K, T> type Item = (usize, &'a K, &'a T);
[src]

pub fn iter_mut_with_ix(&mut self) -> IterMutWithIx<'_, K, T>

Notable traits for IterMutWithIx<'a, K, T>

impl<'a, K: 'a, T: 'a> Iterator for IterMutWithIx<'a, K, T> type Item = (usize, &'a K, &'a mut T);
[src]

pub fn hasher(&self) -> &H[src]

Trait Implementations

impl<K: Eq + Hash, T, Hs: IndexMut<usize, Output = usize> + Index<RangeFull, Output = [usize]>, Es: IndexMut<usize, Output = Slot<(K, T)>>, H: Clone + Hasher> Drop for HashTable<K, T, Hs, Es, H>[src]

Auto Trait Implementations

impl<K, T, Hs, Es, H> Send for HashTable<K, T, Hs, Es, H> where
    Es: Send,
    H: Send,
    Hs: Send
[src]

impl<K, T, Hs, Es, H> Sync for HashTable<K, T, Hs, Es, H> where
    Es: Sync,
    H: Sync,
    Hs: Sync
[src]

impl<K, T, Hs, Es, H> Unpin for HashTable<K, T, Hs, Es, H> where
    Es: Unpin,
    H: Unpin,
    Hs: Unpin
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.