Hash256

Trait Hash256 

pub trait Hash256<T>
where T: ?Sized,
{ // Required method fn hash_sha256(&self) -> HashDigest<T>; }
Expand description

A trait for types that can be hashed with Sha256 by directly hashing the bytes exposed as AsRef<[u8]>.

Required Methods§

fn hash_sha256(&self) -> HashDigest<T>

Hash the type

Implementations on Foreign Types§

§

impl Hash256<str> for &str

§

impl Hash256<String> for String

§

impl Hash256<Vec<u8>> for Vec<u8>

§

impl Hash256<[u8]> for &[u8]

§

fn hash_sha256(&self) -> HashDigest<[u8]>

§

impl<const N: usize> Hash256<[u8; N]> for [u8; N]

§

fn hash_sha256(&self) -> HashDigest<[u8; N]>

Implementors§