Type Alias holo_hash::AnyDhtHash
source · pub type AnyDhtHash = HoloHash<AnyDht>;
Expand description
The hash of anything referrable in the DHT. This is a composite of either an EntryHash or a ActionHash
Aliased Type§
struct AnyDhtHash { /* private fields */ }
Implementations§
source§impl AnyDhtHash
impl AnyDhtHash
sourcepub fn into_primitive(self) -> AnyDhtHashPrimitive
pub fn into_primitive(self) -> AnyDhtHashPrimitive
Match on the primitive hash type represented by this composite hash type
sourcepub fn into_action_hash(self) -> Option<ActionHash>
pub fn into_action_hash(self) -> Option<ActionHash>
If this hash represents an ActionHash, return it, else None
sourcepub fn into_entry_hash(self) -> Option<EntryHash>
pub fn into_entry_hash(self) -> Option<EntryHash>
If this hash represents an EntryHash, return it, else None
sourcepub fn into_agent_pub_key(self) -> Option<AgentPubKey>
pub fn into_agent_pub_key(self) -> Option<AgentPubKey>
If this hash represents an EntryHash which is actually an AgentPubKey, return it, else None.
Trait Implementations§
source§impl From<HoloHash<Action>> for AnyDhtHash
impl From<HoloHash<Action>> for AnyDhtHash
source§fn from(hash: ActionHash) -> Self
fn from(hash: ActionHash) -> Self
Converts to this type from the input type.
source§impl From<HoloHash<Agent>> for AnyDhtHash
impl From<HoloHash<Agent>> for AnyDhtHash
source§fn from(hash: AgentPubKey) -> Self
fn from(hash: AgentPubKey) -> Self
Converts to this type from the input type.
source§impl TryFrom<HoloHash<AnyLinkable>> for AnyDhtHash
impl TryFrom<HoloHash<AnyLinkable>> for AnyDhtHash
§type Error = CompositeHashConversionError<AnyLinkable>
type Error = CompositeHashConversionError<AnyLinkable>
The type returned in the event of a conversion error.