Skip to main content

DynHash

Trait DynHash 

Source
pub trait DynHash: DynEq {
    // Required methods
    fn as_dyn_eq(&self) -> &dyn DynEq;
    fn dyn_hash(&self, state: &mut dyn Hasher);
}
Expand description

An object safe version of Hash. This trait is automatically implemented for any 'static type that implements Hash.

Required Methods§

Source

fn as_dyn_eq(&self) -> &dyn DynEq

Source

fn dyn_hash(&self, state: &mut dyn Hasher)

Trait Implementations§

Source§

impl Hash for dyn DynHash

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: DynEq + Hash> DynHash for T