Crate hash_hasher [] [src]

A std::hash::Hasher which is designed to work with already-hashed data.

Examples

use std::collections::HashMap;
use hash_hasher::HashBuildHasher;

let hash_builder = HashBuildHasher::default();
let mut map = HashMap::with_hasher(hash_builder);

assert!(map.insert(0, "zero").is_none());
assert!(map.insert(1024, "1024").is_none());
assert_eq!(Some("zero"), map.insert(0, "nothing"));

Structs

HashHasher

A hasher which does minimal work to create the required u64 output under the assumption that the input is already a hash digest or otherwise already suitable for use as a key in a HashSet or HashMap.

Type Definitions

HashBuildHasher

Alias for a BuildHasherDefault<HashHasher>.