pub enum AnyDht {
Entry,
Action,
}
Expand description
The AnyDht (composite) HashType
Variants§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AnyDht
impl<'de> Deserialize<'de> for AnyDht
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<AnyDht> for AnyLinkable
impl From<AnyDht> for AnyLinkable
source§impl HashType for AnyDht
impl HashType for AnyDht
source§fn get_prefix(self) -> &'static [u8] ⓘ
fn get_prefix(self) -> &'static [u8] ⓘ
Get the 3-byte prefix for the underlying primitive hash type
source§fn try_from_prefix(prefix: &[u8]) -> HoloHashResult<Self>
fn try_from_prefix(prefix: &[u8]) -> HoloHashResult<Self>
Given a 3-byte prefix, return the corresponding HashType, or error if mismatched.
Trivial for PrimitiveHashType, but useful for composite types
source§impl Ord for AnyDht
impl Ord for AnyDht
source§impl PartialEq<AnyDht> for AnyDht
impl PartialEq<AnyDht> for AnyDht
source§impl PartialOrd<AnyDht> for AnyDht
impl PartialOrd<AnyDht> for AnyDht
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<&AnyDht> for SerializedBytes
impl TryFrom<&AnyDht> for SerializedBytes
§type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
source§fn try_from(t: &AnyDht) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &AnyDht) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
source§impl TryFrom<AnyDht> for SerializedBytes
impl TryFrom<AnyDht> for SerializedBytes
§type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
source§fn try_from(t: AnyDht) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: AnyDht) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
source§impl TryFrom<SerializedBytes> for AnyDht
impl TryFrom<SerializedBytes> for AnyDht
§type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
source§fn try_from(sb: SerializedBytes) -> Result<AnyDht, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<AnyDht, SerializedBytesError>
Performs the conversion.
impl Copy for AnyDht
impl Eq for AnyDht
impl HashTypeAsync for AnyDht
impl StructuralEq for AnyDht
impl StructuralPartialEq for AnyDht
Auto Trait Implementations§
impl RefUnwindSafe for AnyDht
impl Send for AnyDht
impl Sync for AnyDht
impl Unpin for AnyDht
impl UnwindSafe for AnyDht
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.