Trait multihash::Digest [−][src]
pub trait Digest<S: Size>: AsRef<[u8]> + AsMut<[u8]> + From<GenericArray<u8, S>> + Into<GenericArray<u8, S>> + Clone + Hash + Debug + Default + Eq + Send + Sync + 'static { fn size(&self) -> u8 { ... } fn wrap(digest: &[u8]) -> Result<Self, Error> { ... } fn from_reader<R>(r: R) -> Result<Self, Error>
where
R: Read, { ... } }
Stack allocated digest trait.
Provided methods
fn size(&self) -> u8
[src]
Size of the digest.
fn wrap(digest: &[u8]) -> Result<Self, Error>
[src]
Wraps the digest bytes.
fn from_reader<R>(r: R) -> Result<Self, Error> where
R: Read,
[src]
R: Read,
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
impl<S: Size> Digest<S> for Blake2bDigest<S>
[src]
impl<S: Size> Digest<S> for Blake2sDigest<S>
[src]
impl<S: Size> Digest<S> for Blake3Digest<S>
[src]
impl<S: Size> Digest<S> for IdentityDigest<S>
[src]
impl<S: Size> Digest<S> for IdentityDigest<S>
[src]