Skip to main content

hash_of

Function hash_of 

Source
fn hash_of(key: impl Hash) -> u64
Expand description

A stable u64 minted from anything hashable — the shape both keyed-animation and text-editor identity take. Both newtypes below are this, so the pattern is written once.

DefaultHasher::new() is seeded with zeroes, so the same key hashes the same way for the life of the process — which is all a host needs, since the identities it hands out are themselves per-process.