import Std.Hash
Traits
Hash
trait Hash t =
hash: fn t -> U64
Functions
hash_combine
hash_combine (h1: U64) (h2: U64): U64
Combine two hashes to form a new one. This is order-sensitive so (a, b) and (b, a) hash differently. Uses a mixing constant of 2^64 / phi.
Implicits
Show Implicits
hash_string
impl hash_string: Hash String
FNV-1a 64-bit with an offset basis of 14695981039346656037 (0xcbf29ce484222325), and prime of 1099511628211 (0x100000001b3).
hash_u64
impl hash_u64: Hash U64
hash_u8
impl hash_u8: Hash U8
hash_u16
impl hash_u16: Hash U16
hash_u32
impl hash_u32: Hash U32
hash_usz
impl hash_usz: Hash Usz
hash_i8
impl hash_i8: Hash I8
hash_i16
impl hash_i16: Hash I16
hash_i32
impl hash_i32: Hash I32
hash_i64
impl hash_i64: Hash I64
hash_isz
impl hash_isz: Hash Isz
hash_f32
impl hash_f32: Hash F32
hash_f64
impl hash_f64: Hash F64
hash_bool
impl hash_bool: Hash Bool
hash_char
impl hash_char: Hash Char
hash_pair
impl hash_pair {_: Hash a} {_: Hash b}: Hash (a, b)
hash_maybe
impl hash_maybe {_: Hash a}: Hash (Maybe a)
hash_result
impl hash_result {_: Hash a} {_: Hash e}: Hash (Result a e)