pub trait HashableContent: Sized {
    type HashType: HashType;

    // Required methods
    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§

source

type HashType: HashType

The HashType which this content will be hashed to

Required Methods§

source

fn hash_type(&self) -> Self::HashType

The HashType which this content will be hashed to

source

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

Object Safety§

This trait is not object safe.

Implementors§

§

impl HashableContent for Action

source§

impl HashableContent for DhtOp

§

impl HashableContent for Entry

§

impl HashableContent for EntryCreationAction

Allows a EntryCreationAction to hash the same bytes as the equivalent Action variant without needing to clone the action.

source§

impl HashableContent for UniqueForm<'_>

§

impl HashableContent for AgentValidationPkg

§

impl HashableContent for CloseChain

§

impl HashableContent for Create

§

impl HashableContent for Delete

§

impl HashableContent for Dna

source§

impl HashableContent for DnaDef

§

impl HashableContent for InitZomesComplete

§

impl HashableContent for OpenChain

source§

impl HashableContent for SignedAction

§

impl HashableContent for Update

source§

impl HashableContent for DnaWasm

source§

impl<C> HashableContent for HoloHashed<C>
where C: HashableContent,

§

impl<C, T> HashableContent for SignedHashed<C>
where C: HashableContent<HashType = T>, T: PrimitiveHashType,