Trait holochain::core::HashableContent
source · [−]pub trait HashableContent {
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
fn 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
Implementations on Foreign Types
sourceimpl<'_> HashableContent for UniqueForm<'_>
impl<'_> HashableContent for UniqueForm<'_>
type HashType = DhtOp
fn hash_type(&self) -> <UniqueForm<'_> as HashableContent>::HashType
fn hashable_content(&self) -> HashableContentBytes
sourceimpl HashableContent for DhtOp
impl HashableContent for DhtOp
type HashType = DhtOp
fn hash_type(&self) -> <DhtOp as HashableContent>::HashType
fn hashable_content(&self) -> HashableContentBytes
sourceimpl HashableContent for DnaWasm
impl HashableContent for DnaWasm
type HashType = Wasm
fn hash_type(&self) -> <DnaWasm as HashableContent>::HashType
fn hashable_content(&self) -> HashableContentBytes
sourceimpl HashableContent for SignedHeader
impl HashableContent for SignedHeader
type HashType = Header
fn hash_type(&self) -> <SignedHeader as HashableContent>::HashType
fn hashable_content(&self) -> HashableContentBytes
sourceimpl HashableContent for DnaDef
impl HashableContent for DnaDef
type HashType = Dna
fn hash_type(&self) -> <DnaDef as HashableContent>::HashType
fn hashable_content(&self) -> HashableContentBytes
impl HashableContent for AgentValidationPkg
impl HashableContent for AgentValidationPkg
type HashType = Header
fn hash_type(&self) -> <AgentValidationPkg as HashableContent>::HashType
fn hashable_content(&self) -> HashableContentBytes
impl HashableContent for EntryCreationHeader
impl HashableContent for EntryCreationHeader
Allows a [EntryCreationHeader
] to hash the same bytes as
the equivalent [Header
] variant without needing to clone the header.