pub trait RecursiveHashTrait {
type Error: Debug;
// Required method
fn try_hash(&self) -> Result<ByteArray, Self::Error>;
// Provided methods
fn hash(&self) -> ByteArray { ... }
fn try_to_hashed_hashable_message(
&self
) -> Result<HashableMessage<'_>, Self::Error> { ... }
fn to_hashed_hashable_message(&self) -> HashableMessage<'_> { ... }
}Expand description
Trait implementing defining an interface for objects implementing a recursive hash function.
The enum HashableMessage implements the trait.
Required Associated Types§
Required Methods§
Provided Methods§
sourcefn try_to_hashed_hashable_message(
&self
) -> Result<HashableMessage<'_>, Self::Error>
fn try_to_hashed_hashable_message( &self ) -> Result<HashableMessage<'_>, Self::Error>
Try recursive hash and return a variant HashableMessage::Hashed containing the hashed value
Return Self::Error if an error appears during the calculation
sourcefn to_hashed_hashable_message(&self) -> HashableMessage<'_>
fn to_hashed_hashable_message(&self) -> HashableMessage<'_>
Recursive hash and return a variant HashableMessage::Hashed containing the hashed value
Panic if an error appears during the calculation