[−][src]Trait multihash::MultihashDigest
Trait for a multihash digest.
Required methods
fn code(&self) -> C
Returns the code of the multihash.
fn digest(&self) -> &[u8]
Returns the digest.
fn read<R: Read>(r: R) -> Result<Self, Error> where
Self: Sized,
Self: Sized,
Reads a multihash from a byte stream.
Provided methods
fn size(&self) -> u8
Returns the size of the digest.
fn from_bytes(bytes: &[u8]) -> Result<Self, Error> where
Self: Sized,
Self: Sized,
Parses a multihash from a bytes.
fn write<W: Write>(&self, w: W) -> Result<(), Error>
Writes a multihash to a byte stream.
fn to_bytes(&self) -> Vec<u8>
Returns the bytes of a multihash.