pub enum HashType {
Show 14 variants
OneAtATime,
Md5,
Crc16,
Crc32,
Crc32a,
Fnv1_64,
Fnv1a_64,
Fnv1_32,
Fnv1a_32,
Hsieh,
Murmur,
Jenkins,
Murmur3,
Murmur3X64_64,
}Expand description
All hashing algorithms supported by the engine.
Variant order mirrors the on-disk hash_type_t integer codec:
configuration files and the dyn-hash-tool CLI rely on the integer
ordering of these variants when they round-trip through other
systems.
§Examples
use dynomite::hashkit::HashType;
assert_eq!(HashType::all().len(), 14);
assert_eq!(HashType::Murmur3.as_str(), "murmur3");Variants§
OneAtATime
Jenkins one-at-a-time.
Md5
MD5; truncates the digest to its low 32 bits.
Crc16
CRC-16 (CCITT polynomial table).
Crc32
libmemcached-compatible CRC-32.
Crc32a
Standards-compliant CRC-32.
Fnv1_64
FNV-1 over 64-bit accumulator, truncated to 32 bits.
Fnv1a_64
FNV-1a operating in 32-bit space using the 64-bit prime.
Fnv1_32
FNV-1 in 32 bits.
Fnv1a_32
FNV-1a in 32 bits.
Hsieh
Paul Hsieh’s “SuperFastHash”.
Murmur
MurmurHash 2.
Jenkins
Bob Jenkins lookup3.
Murmur3
MurmurHash3 x86 128-bit.
Murmur3X64_64
MurmurHash3 truncated to 64 bits (used by the random-slicing distribution lookup).
Implementations§
Source§impl HashType
impl HashType
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Lower-case algorithm name as it appears in YAML configurations.
§Examples
use dynomite::hashkit::HashType;
assert_eq!(HashType::Murmur3.as_str(), "murmur3");Trait Implementations§
impl Copy for HashType
impl Eq for HashType
impl StructuralPartialEq for HashType
Auto Trait Implementations§
impl Freeze for HashType
impl RefUnwindSafe for HashType
impl Send for HashType
impl Sync for HashType
impl Unpin for HashType
impl UnsafeUnpin for HashType
impl UnwindSafe for HashType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.