Trait sc_network::multiaddr::multihash::Digest[]

pub trait Digest<S>: 'static + AsRef<[u8]> + AsMut<[u8]> + From<GenericArray<u8, S>> + Into<GenericArray<u8, S>> + Clone + Hash + Debug + Default + Eq + Send + Sync where
    S: Size
{ fn size(&self) -> u8 { ... }
fn wrap(digest: &[u8]) -> Result<Self, Error> { ... }
fn from_reader<R>(r: R) -> Result<Self, Error>
    where
        R: Read
, { ... } }
Expand description

Stack allocated digest trait.

Provided methods

Size of the digest.

Wraps the digest bytes.

Reads a multihash digest from a byte stream that contains the digest prefixed with the size.

The byte stream must not contain the code as prefix.

Implementors