Title: Theory / Unimportant / CS / Programming / Rust / Library / Hash

Instruction: #[derive(Hash)]
struct StructName {
  content
}
Page: https://doc.rust-lang.org/std/hash/index.html
Meaning: Hash of the struct is automatically derived from the has of its component
Language: Rust
Similar to: struct StructName {
  content
}

Typ: Hash
Meaning: fn hash<H: Hasher>(&self, state: &mut H): method that add element to a hasher
Page: https://doc.rust-lang.org/std/hash/index.html
Assuming: Implementations of hash should ensure that the data they pass to the Hasher are prefix-free. That is, unequal values should cause two different sequences of values to be written, and neither of the two sequences should be a prefix of the other.
Language: Rust

Typ: Hasher
Meaning: Function that generate a hash from various component added iteratively
Function: fn finish(&self) -> u64;
Page: https://doc.rust-lang.org/std/hash/index.html
Function2: fn write(&mut self, bytes: &[u8]);

Instruction: hasher.finish()
Page: https://doc.rust-lang.org/std/hash/index.html
Returns: A hash value generated by previous values added to the hashers
Variables: hasher: Hasher
Typ: Hasher

Instruction: hasher.write_intType(i: intType)
hasher.write(i: &[u8])
Page: https://doc.rust-lang.org/std/hash/index.html
Effect: Let hasher knows the value i must be considered in the hashing
Variables: hasher: Hasher

Typ: BuildHasher
Meaning: Tool to generate hashers
Function: fn build_hasher(&self) -> Self::Hasher: a new hasher.
Page: https://doc.rust-lang.org/std/hash/index.html
Assuming: All hashers start in the same initial state