DoubleHashHasher

Struct DoubleHashHasher 

Source
pub struct DoubleHashHasher<T, H1, H2> { /* private fields */ }
Expand description

Enhanced double hashing hasher.

Emits an iterator (for a given input key) over hash values generated using enhanced double hashing.

Implementations§

Source§

impl DoubleHashHasher<u64, Xxh3Builder, Xxh3Builder>

Source

pub fn new() -> Self

Constructs a new double hasher using default parameters.

Source§

impl<H1, H2> DoubleHashHasher<u32, H1, H2>

Source

pub fn with_hash_builders(hash_builder1: H1, hash_builder2: H2, n: u32) -> Self

Source§

impl<H1, H2> DoubleHashHasher<u64, H1, H2>

Source

pub fn with_hash_builders(hash_builder1: H1, hash_builder2: H2, n: u64) -> Self

Source§

impl<H1, H2> DoubleHashHasher<u128, H1, H2>

Source

pub fn with_hash_builders(hash_builder1: H1, hash_builder2: H2, n: u128) -> Self

Trait Implementations§

Source§

impl<T: Clone, H1: Clone, H2: Clone> Clone for DoubleHashHasher<T, H1, H2>

Source§

fn clone(&self) -> DoubleHashHasher<T, H1, H2>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<H1, H2> HashIterHasher<u128> for DoubleHashHasher<u128, H1, H2>
where H1: BuildHasher, H2: BuildHasher,

Source§

fn hash_iter<K: Hash + ?Sized>( &self, key: &K, count: usize, ) -> impl Iterator<Item = u128>

Returns an iterator over count number of hash values generated using enhanced double hashing.
Source§

impl<H1, H2> HashIterHasher<u32> for DoubleHashHasher<u32, H1, H2>
where H1: BuildHasher, H2: BuildHasher,

Source§

fn hash_iter<K: Hash + ?Sized>( &self, key: &K, count: usize, ) -> impl Iterator<Item = u32>

Returns an iterator over count number of hash values generated using enhanced double hashing.
Source§

impl<H1, H2> HashIterHasher<u64> for DoubleHashHasher<u64, H1, H2>
where H1: BuildHasher, H2: BuildHasher,

Source§

fn hash_iter<K: Hash + ?Sized>( &self, key: &K, count: usize, ) -> impl Iterator<Item = u64>

Returns an iterator over count number of hash values generated using enhanced double hashing.
Source§

impl<T: Copy, H1: Copy, H2: Copy> Copy for DoubleHashHasher<T, H1, H2>

Auto Trait Implementations§

§

impl<T, H1, H2> Freeze for DoubleHashHasher<T, H1, H2>
where H1: Freeze, H2: Freeze, T: Freeze,

§

impl<T, H1, H2> RefUnwindSafe for DoubleHashHasher<T, H1, H2>

§

impl<T, H1, H2> Send for DoubleHashHasher<T, H1, H2>
where H1: Send, H2: Send, T: Send,

§

impl<T, H1, H2> Sync for DoubleHashHasher<T, H1, H2>
where H1: Sync, H2: Sync, T: Sync,

§

impl<T, H1, H2> Unpin for DoubleHashHasher<T, H1, H2>
where H1: Unpin, H2: Unpin, T: Unpin,

§

impl<T, H1, H2> UnwindSafe for DoubleHashHasher<T, H1, H2>
where H1: UnwindSafe, H2: UnwindSafe, T: 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.