pub struct AddressHasherBuilder { /* private fields */ }Expand description
A builder for faster, but less collision resistant hasher for addresses.
Initializes AddressHasher instances that use an 8-byte
slice of the address as the hash value. Should not be used when
collisions might be used to mount DOS attacks.
Using this results in about 4x faster lookups in a typical hashmap.
Trait Implementations§
Source§impl BuildHasher for AddressHasherBuilder
impl BuildHasher for AddressHasherBuilder
Source§impl Clone for AddressHasherBuilder
impl Clone for AddressHasherBuilder
Source§fn clone(&self) -> AddressHasherBuilder
fn clone(&self) -> AddressHasherBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for AddressHasherBuilder
impl Default for AddressHasherBuilder
Source§fn default() -> Self
fn default() -> Self
Default construct the AddressHasherBuilder.
The position of the slice is determined initially
through random draw and then by incrementing a thread-local
This way each hashmap can be expected to use a slightly different
slice. This is essentially the same mechanism as what is used by
RandomState
Auto Trait Implementations§
impl Freeze for AddressHasherBuilder
impl RefUnwindSafe for AddressHasherBuilder
impl Send for AddressHasherBuilder
impl Sync for AddressHasherBuilder
impl Unpin for AddressHasherBuilder
impl UnwindSafe for AddressHasherBuilder
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