Fusuma

Components / Lists and updates

stamp

The 32-bit hash lazy compares.

The 32-bit hash lazy compares.

The same key gives the same stamp in every run of the program.

Signature

pub fn stamp<K: core::hash::Hash + ?Sized>(key: &K) -> u32

Example

use fusuma::stamp;
assert_eq!(stamp("Ada"), stamp("Ada"));
assert_ne!(stamp("Ada"), stamp("Grace"));
assert_eq!(stamp(&(1, 2)), stamp(&(1, 2)));

All components · Source