pub fn compute_hash<B: Serialize>(b: &B) -> Result<Hash, Error> {
    let mut hasher = Sha3_256::new();
    let ser = bincode::serialize(b).map_err(Error::ComputeHashSerialize)?;
    hasher.input(ser);
    let r = hasher.result();
    Ok(Hash(unsafe { transmute(r) }))
}
/// Computes the hash of serializable data.
Computes the hash of serializable data.
Computes the hash of serializable data .
pub fn compute_hash<B: Serialize>(b: &B) -> Result<Hash, Error> {
    let mut hasher = Sha3_256::new();
    let ser = bincode::serialize(b).map_err(Error::ComputeHashSerialize)?;
    hasher.input(ser);
    let r = hasher.result();
    Ok(Hash(unsafe { transmute(r) }))
}
pub fn compute_hash < B : Serialize > ( b : & B ) -> Result < Hash , Error > { let mut hasher = Sha3_256 :: new ( ) ; let ser = bincode :: serialize ( b ) . map_err ( Error :: ComputeHashSerialize ) ? ; hasher . input ( ser ) ; let r = hasher . result ( ) ; Ok ( Hash ( unsafe { transmute ( r ) } ) ) }
Computes the hash of serializable data.
Computes the hash of serializable data .
b
&B