Movatterモバイル変換


[0]ホーム

URL:


Docs.rs
logo

Cratetwox_hash

source ·[]
Expand description

A Rust implementation of theXXHash algorithm.

With a fixed seed

usestd::hash::BuildHasherDefault;usestd::collections::HashMap;usetwox_hash::XxHash64;letmuthash:HashMap<_,_,BuildHasherDefault<XxHash64>>=Default::default();hash.insert(42,"the answer");assert_eq!(hash.get(&42),Some(&"the answer"));

With a random seed

usestd::collections::HashMap;usetwox_hash::RandomXxHashBuilder64;letmuthash:HashMap<_,_,RandomXxHashBuilder64>=Default::default();hash.insert(42,"the answer");assert_eq!(hash.get(&42),Some(&"the answer"));

Re-exports

pub use crate::xxh3::Hash128 as Xxh3Hash128;
pub use crate::xxh3::Hash64 as Xxh3Hash64;

Modules

The in-progress XXH3 algorithm.

Structs

Constructs a randomized seed and reuses it for multiple hasher instances. See the usage warning onXxHash32.

Constructs a randomized seed and reuses it for multiple hasher instances.

Constructs a randomized seed and reuses it for multiple hasher instances.

Constructs a randomized seed and reuses it for multiple hasher instances.

Calculates the 32-bit hash. Care should be taken when using thishash.

Calculates the 64-bit hash.

Type Definitions

A backwards compatibility type alias. Consider directly usingRandomXxHashBuilder64 instead.

A backwards compatibility type alias. Consider directly usingXxHash64 instead.


[8]ページ先頭

©2009-2025 Movatter.jp