Struct HashTable

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

Implementations§

Source§

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

pub fn hasher(&self) -> &H

Trait Implementations§

Source§

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

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<K, T, Hs, Es, H> Freeze for HashTable<K, T, Hs, Es, H>
where Hs: Freeze, Es: Freeze, H: Freeze,

§

impl<K, T, Hs, Es, H> RefUnwindSafe for HashTable<K, T, Hs, Es, H>

§

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

§

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

§

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

§

impl<K, T, Hs, Es, H> UnwindSafe for HashTable<K, T, Hs, Es, H>
where Hs: UnwindSafe, Es: UnwindSafe, H: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.