Expand description
The hash extension module. It provides extra concepts like Fingerprint
and
HashedTrait
.
Structs§
- An archived
Fingerprint
- See https://github.com/rust-lang/rust/blob/master/compiler/rustc_hir/src/stable_hash_impls.rs#L22 The fingerprint conflicts should be very rare and should be handled by the compiler.
- A fingerprint builder that produces unique fingerprint for each item. It resolves the conflict by checking the underlying data. See
Fingerprint
for more information. - The resolver for an archived
Fingerprint
- A fingerprint hasher that uses the [
SipHasher13
] algorithm. - A speedy hash algorithm for use within rustc. The hashmap in liballoc by default uses SipHash which isn’t quite as speedy as we want. In the compiler we’re not really worried about DOS attempts, so we use a fast non-cryptographic hash.
- A trait that provides a static prehashed 64-bit hash for any internal
T
.
Traits§
- A fingerprint hasher that extends the
std::hash::Hasher
trait. - A trait that provides a static prehashed 128-bit hash.
Functions§
- A convenience function for when you need a quick 32-bit hash.
- A convenience function for when you need a quick 64-bit hash.
- Calculate a 128-bit siphash of a value. Currently, this function use [
SipHasher13
] as the underlying hash algorithm. - This function provides a hash function for items, which also includes a type id as part of the hash. Note: This function is not stable across different versions of typst-ts, so it is preferred to be always used in memory. Currently, this function use [
SipHasher13
] as the underlying hash algorithm.
Type Aliases§
- The base hasher for the
FingerprintSipHasher
. - A dashmap that uses the FxHasher as the underlying hasher.
- Type alias for a hash map that uses the Fx hashing algorithm.
- Type alias for a hash set that uses the Fx hashing algorithm.