Skip to main content

Hashable

Trait Hashable 

Source
pub trait Hashable<Hasher> {
    // Required method
    fn write(&self, hasher: &mut Hasher);
}
Expand description

Something that we know how to hash.

Required Methods§

Source

fn write(&self, hasher: &mut Hasher)

Send the content of Self to the given hasher.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<Hasher> Hashable<Hasher> for [u8]
where Hasher: Write,

Source§

fn write(&self, hasher: &mut Hasher)

Implementors§

Source§

impl<'de, T, Hasher> Hashable<Hasher> for T
where T: BcsHashable<'de>, Hasher: Write,