Struct deterministic_hash::DeterministicHasher [−][src]
pub struct DeterministicHasher<T: Hasher>(_);
Expand description
Wrapper around any hasher to make it deterministic.
use core::hash::Hash; use crc::crc32::Hasher32; use deterministic_hash::DeterministicHasher; let mut hasher = DeterministicHasher::new(crc::crc32::Digest::new(crc::crc32::KOOPMAN)); (0x1337 as usize).hash(&mut hasher); assert_eq!(hasher.as_inner().sum32(), 2482448842);
Implementations
Trait Implementations
Implementation of hasher that forces all bytes written to be platform agnostic.
Writes a single u128
into this hasher.
Writes a single usize
into this hasher.
Writes a single i128
into this hasher.
Writes a single isize
into this hasher.
Auto Trait Implementations
impl<T> Send for DeterministicHasher<T> where
T: Send,
impl<T> Sync for DeterministicHasher<T> where
T: Sync,
impl<T> Unpin for DeterministicHasher<T> where
T: Unpin,