Hashable

Trait Hashable 

Source
pub trait Hashable {
    // Required method
    fn update<H: Hasher>(&self, h: &mut H);

    // Provided method
    fn digest<H: Hasher>(&self) -> <H as Hasher>::Output
       where Self: Sized { ... }
}

Required Methods§

Source

fn update<H: Hasher>(&self, h: &mut H)

Provided Methods§

Source

fn digest<H: Hasher>(&self) -> <H as Hasher>::Output
where Self: Sized,

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 Hashable for bool

Source§

fn update<H: Hasher>(&self, h: &mut H)

Source§

impl Hashable for i8

Source§

fn update<H: Hasher>(&self, h: &mut H)

Source§

impl Hashable for i16

Source§

fn update<H: Hasher>(&self, h: &mut H)

Source§

impl Hashable for i32

Source§

fn update<H: Hasher>(&self, h: &mut H)

Source§

impl Hashable for i64

Source§

fn update<H: Hasher>(&self, h: &mut H)

Source§

impl Hashable for u8

Source§

fn update<H: Hasher>(&self, h: &mut H)

Source§

impl Hashable for u16

Source§

fn update<H: Hasher>(&self, h: &mut H)

Source§

impl Hashable for u32

Source§

fn update<H: Hasher>(&self, h: &mut H)

Source§

impl Hashable for u64

Source§

fn update<H: Hasher>(&self, h: &mut H)

Source§

impl Hashable for String

Source§

fn update<H: Hasher>(&self, h: &mut H)

Source§

impl<T: Hashable> Hashable for Vec<T>

Source§

fn update<H: Hasher>(&self, h: &mut H)

Implementors§