HashIsInjective

Trait HashIsInjective 

Source
pub trait HashIsInjective: Hash + Eq { }
Expand description

In most cases (e.g., standard and automatically derived Hash traits), the hash trait feeds different bytes for different inputs. In that case, we can compute a fingerprint with the regular std::hash::Hash implementation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl HashIsInjective for str

Source§

impl HashIsInjective for String

Source§

impl<T: HashIsInjective> HashIsInjective for Option<T>

Source§

impl<T: HashIsInjective> HashIsInjective for [T]

Source§

impl<T: HashIsInjective> HashIsInjective for Vec<T>

Implementors§