pub fn read(r: &mut ByteCursor) -> Result<Self, Error>
  where Self: Sized {
    let (code, size, digest) = match read_multihash(r) {
      Ok((c, s, d)) => (c, s, d),
      Err(e) => return Err(e),
    };
    Ok(Self { code, size, digest })
  }
/// Reads a multihash from a byte stream.
Reads a multihash from a byte stream.
Reads a multihash from a byte stream .
pub fn read(r: &mut ByteCursor) -> Result<Self, Error>
  where Self: Sized {
    let (code, size, digest) = match read_multihash(r) {
      Ok((c, s, d)) => (c, s, d),
      Err(e) => return Err(e),
    };
    Ok(Self { code, size, digest })
  }
pub fn read ( r : & mut ByteCursor ) -> Result < Self , Error > where Self : Sized { let ( code , size , digest ) = match read_multihash ( r ) { Ok ( ( c , s , d ) ) => ( c , s , d ) , Err ( e ) => return Err ( e ) , } ; Ok ( Self { code , size , digest } ) }
Reads a multihash from a byte stream.
Reads a multihash from a byte stream .
r
&mut ByteCursor
r
&mut ByteCursor