Re-exported from core::hash::HashIn.
forall K, C.
trait HashIn {
/// The state with `key` written, its bytes read through `cx`.
fn hash_in(&cx: C, key: K, state: HashState) -> HashState;
/// Whether `a` equals `b`, their bytes read through `cx`.
fn eq_in(&cx: C, a: K, b: K) -> bool;
}
Hashing and equality for a Copy key that points into a domain, read through that domain's capability C: a Str['t] read with an Exclusive!['t], say. The key is a view rather than an owner, so it is not handed back; the capability is lent by place, as ReadBytes lends it. core::str and core::slice have the byte-view instances; the primitive and tuple ones are at the end of this module.
Methods
method hash_insource
fn hash_in(&cx: C, key: K, state: HashState) -> HashState;
The state with key written, its bytes read through cx.
method eq_insource
fn eq_in(&cx: C, a: K, b: K) -> bool;
Whether a equals b, their bytes read through cx.
Implementors
instance HashIn[u8, C]source
forall C.
instance HashIn[u8, C] { ... }
In std::hash.
A u8 key, under any capability: hashed and compared as Hash and Eq do.
instance HashIn[u16, C]source
forall C.
instance HashIn[u16, C] { ... }
In std::hash.
A u16 key, under any capability: hashed and compared as Hash and Eq do.
instance HashIn[u32, C]source
forall C.
instance HashIn[u32, C] { ... }
In std::hash.
A u32 key, under any capability: hashed and compared as Hash and Eq do.
instance HashIn[u64, C]source
forall C.
instance HashIn[u64, C] { ... }
In std::hash.
A u64 key, under any capability: hashed and compared as Hash and Eq do.
instance HashIn[usize, C]source
forall C.
instance HashIn[usize, C] { ... }
In std::hash.
A usize key, under any capability: hashed and compared as Hash and Eq do.
instance HashIn[i8, C]source
forall C.
instance HashIn[i8, C] { ... }
In std::hash.
A i8 key, under any capability: hashed and compared as Hash and Eq do.
instance HashIn[i16, C]source
forall C.
instance HashIn[i16, C] { ... }
In std::hash.
A i16 key, under any capability: hashed and compared as Hash and Eq do.
instance HashIn[i32, C]source
forall C.
instance HashIn[i32, C] { ... }
In std::hash.
A i32 key, under any capability: hashed and compared as Hash and Eq do.
instance HashIn[i64, C]source
forall C.
instance HashIn[i64, C] { ... }
In std::hash.
A i64 key, under any capability: hashed and compared as Hash and Eq do.
instance HashIn[isize, C]source
forall C.
instance HashIn[isize, C] { ... }
In std::hash.
A isize key, under any capability: hashed and compared as Hash and Eq do.
instance HashIn[bool, C]source
forall C.
instance HashIn[bool, C] { ... }
In std::hash.
A bool key, under any capability: hashed and compared as Hash and Eq do.
instance HashIn[(A, B), C]source
forall A, B, C where HashIn[A, C], HashIn[B, C], Copy[A], Copy[B].
instance HashIn[(A, B), C] { ... }
In std::hash.
A pair key: its parts hashed and compared in order, each under cx.
instance HashIn[(A, B, D), C]source
forall A, B, D, C where HashIn[A, C], HashIn[B, C], HashIn[D, C], Copy[A], Copy[B], Copy[D].
instance HashIn[(A, B, D), C] { ... }
In std::hash.
A triple key: its parts hashed and compared in order, each under cx.
instance HashIn[Str['t], C]source
forall C, 't where ReadBytes[C, Str['t]].
instance HashIn[Str['t], C] { ... }
In std::str.
Text hashes and compares by its bytes, read through the capability C.
instance HashIn[ArenaVec[T, 'k], Domain!['k]]source
forall T, 'k where Copy[T], Sized[T], HashIn[T, Domain!['k]].
instance HashIn[ArenaVec[T, 'k], Domain!['k]] { ... }
In std::collections::arena_vec.
A vec as a key, hashed and compared element by element under the domain's context.