Trait holochain::core::HashableContent
source · pub trait HashableContent: Sized {
type HashType: HashType;
fn hash_type(&self) -> Self::HashType;
fn hashable_content(&self) -> HashableContentBytes;
}
Expand description
Any implementor of HashableContent may be used in a HoloHashed to pair data with its HoloHash representation. It also has an associated HashType.
Required Associated Types
Required Methods
sourcefn hashable_content(&self) -> HashableContentBytes
fn hashable_content(&self) -> HashableContentBytes
Return a subset of the content, either as SerializedBytes “content”, which will be used to compute the hash, or as an already precomputed hash which will be used directly
Implementors
sourceimpl HashableContent for DhtOp
impl HashableContent for DhtOp
sourceimpl HashableContent for UniqueForm<'_>
impl HashableContent for UniqueForm<'_>
impl HashableContent for Action
impl HashableContent for Action
impl HashableContent for Entry
impl HashableContent for Entry
impl HashableContent for EntryCreationAction
impl HashableContent for EntryCreationAction
Allows a EntryCreationAction
to hash the same bytes as
the equivalent Action
variant without needing to clone the action.