[][src]Trait multihash::MultihashCode

pub trait MultihashCode: Into<u64> + TryFrom<u64, Error = Error> + Copy + Debug + Eq + Send + Sync + 'static {
    type Multihash: MultihashDigest<Self>;
    fn size(&self) -> u8;
fn digest(&self, input: &[u8]) -> Self::Multihash; }

Trait to compute the digest of a multihash code.

Associated Types

type Multihash: MultihashDigest<Self>

Multihash type.

Loading content...

Required methods

fn size(&self) -> u8

Returns the size of the digest.

fn digest(&self, input: &[u8]) -> Self::Multihash

Returns the hash of the input.

Loading content...

Implementors

impl MultihashCode for Code[src]

type Multihash = Multihash

Loading content...