[][src]Trait bytehash::ByteHash

pub trait ByteHash: 'static + Sized + Clone + Default {
    type Digest: AsRef<[u8]> + AsMut<[u8]> + Copy + Clone + Eq + Hash + Default + Send;
    type State: State<Self::Digest> + Hasher;
    fn state() -> Self::State;

    fn hash<T: Hash + ?Sized>(t: &T) -> Self::Digest { ... }
}

The main trait

Associated Types

type Digest: AsRef<[u8]> + AsMut<[u8]> + Copy + Clone + Eq + Hash + Default + Send

The type that is used for the final hash value

type State: State<Self::Digest> + Hasher

The state for computing hashes

Loading content...

Required methods

fn state() -> Self::State

Construct a new hash-state

Loading content...

Provided methods

fn hash<T: Hash + ?Sized>(t: &T) -> Self::Digest

Return the hash of a type

Loading content...

Implementors

impl ByteHash for Blake2b[src]

type Digest = [u8; 32]

type State = Blake2bState

impl<H> ByteHash for Wrapped<H> where
    H: 'static + Hasher + Default + Clone
[src]

type Digest = [u8; 8]

type State = WrappedState<H>

Loading content...