A suite of non-cryptographic hash functions for Rust.
Example
use ;
use ;
let h = hash64;
assert_eq!;
By default, HashMap
uses a hashing algorithm selected to
provide resistance against HashDoS
attacks.
The hashing algorithm can be replaced on a per-HashMap
basis
using the HashMap::with_hasher
or
HashMap::with_capacity_and_hasher
methods.
It also cowork with HashMap
or HashSet
, act as a hash function
use HashSet;
use Hash128;
let mut set = with_hasher;
set.insert;
Or use RandomState<CityHash64>
with a random seed.
use HashMap;
use ;
let s = new;
let mut map = with_hasher;
assert_eq!;
assert_eq!;
map.insert;
assert_eq!;
assert_eq!;