Trait bevy_retrograde_epaint::ahash::CallHasher [−]
pub trait CallHasher { fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where
B: BuildHasher,
H: Hash + ?Sized; }
Expand description
Provides a way to get an optimized hasher for a given data type. Rather than using a Hasher generically which can hash any value, this provides a way to get a specialized hash for a specific type. So this may be faster for primitive types.
Example
use std::hash::BuildHasher; use ahash::RandomState; use ahash::CallHasher; let hash_builder = RandomState::new(); //... let value = 17; let hash = u32::get_hash(&value, &hash_builder);
Required methods
Implementations on Foreign Types
impl CallHasher for i16
impl CallHasher for i16
impl CallHasher for [u8]
impl CallHasher for [u8]
impl CallHasher for i8
impl CallHasher for i8
impl CallHasher for i128
impl CallHasher for i128
impl CallHasher for u16
impl CallHasher for u16
impl CallHasher for u32
impl CallHasher for u32
impl CallHasher for str
impl CallHasher for str
impl CallHasher for i64
impl CallHasher for i64
impl CallHasher for Vec<u8, Global>
impl CallHasher for Vec<u8, Global>
impl CallHasher for u128
impl CallHasher for u128
impl CallHasher for String
impl CallHasher for String
impl CallHasher for i32
impl CallHasher for i32
impl CallHasher for u64
impl CallHasher for u64
impl CallHasher for isize
impl CallHasher for isize
impl CallHasher for usize
impl CallHasher for usize
impl CallHasher for u8
impl CallHasher for u8
Implementors
impl<T> CallHasher for T where
T: Hash + ?Sized,