1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//! In-memory hashing: RapidHasher with a focus on speed.
//!
//! Designed to maximise hashmap fetch and insert performance on most datasets.
//!
//! This is a specific instantiation of the [rapidhash::inner] module with the following settings:
//! - `AVALANCHE` is disabled.
//! - `SPONGE` is enabled.
//! - `COMPACT` is disabled, unless building for WASM targets.
//! - `PROTECTED` is disabled.
const AVALANCHE: bool = false;
const SPONGE: bool = true;
const COMPACT: bool = cfg!;
const PROTECTED: bool = false;
use crateinner;
/// A [Hasher] inspired by [rapidhash::v3::rapidhash_v3] with a focus on speed and throughput.
///
/// This is an alias for [inner::RapidHasher] with the following settings:
/// - `AVALANCHE` is disabled.
/// - `SPONGE` is enabled.
/// - `COMPACT` is disabled.
/// - `PROTECTED` is disabled.
///
/// Use [crate::quality::RapidHasher] for a higher quality hash output where necessary.
pub type RapidHasher = RapidHasher;
/// A [std::hash::BuildHasher] trait compatible hasher that uses the [RapidHasher] algorithm.
///
/// This is an alias for [inner::RapidBuildHasher] with the following settings:
/// - `AVALANCHE` is disabled.
/// - `SPONGE` is enabled.
/// - `COMPACT` is disabled.
/// - `PROTECTED` is disabled.
///
/// Note there that [crate::RapidRandomState] should be used
pub type RapidBuildHasher = RapidBuildHasher;
/// A rapidhash equivalent to [std::hash::RandomState] that uses a random seed and secrets.
pub type RandomState = RandomState;
/// A [std::collections::HashMap] that uses the [RapidHasher] hash.
///
/// This is an alias for [inner::RapidHashMap] with the following settings:
/// - `AVALANCHE` is disabled.
/// - `SPONGE` is enabled.
/// - `COMPACT` is disabled.
/// - `PROTECTED` is disabled.
///
/// Use [crate::quality::RapidHashMap] where higher hash collision resistance is required.
pub type RapidHashMap<K, V> = RapidHashMap;
/// A [std::collections::HashSet] that uses the [RapidHasher] hash.
///
/// This is an alias for [inner::RapidHashSet] with the following settings:
/// - `AVALANCHE` is disabled.
/// - `SPONGE` is enabled.
/// - `COMPACT` is disabled.
/// - `PROTECTED` is disabled.
///
/// Use [crate::quality::RapidHashSet] where higher hash collision resistance is required.
pub type RapidHashSet<K> = RapidHashSet;
pub use HashMapExt;
pub use HashSetExt;