Trait chksum_core::Hashable

source ·
pub trait Hashable: AsRef<[u8]> {
    // Provided methods
    fn hash<H>(&self) -> H::Digest
       where H: Hash { ... }
    fn hash_with<H>(&self, hash: &mut H)
       where H: Hash { ... }
}
Expand description

A trait for simple bytes-like objects.

Provided Methods§

source

fn hash<H>(&self) -> H::Digest
where H: Hash,

source

fn hash_with<H>(&self, hash: &mut H)
where H: Hash,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Hashable for &str

source§

impl Hashable for &[u8]

source§

impl Hashable for String

source§

impl Hashable for Vec<u8>

source§

impl<T> Hashable for &T
where T: Hashable,

source§

impl<T> Hashable for &mut T
where T: Hashable,

source§

impl<const LENGTH: usize> Hashable for [u8; LENGTH]

Implementors§