Struct core::identifier::DigestIdentifier
[−]pub struct DigestIdentifier {
pub derivator: DigestDerivator,
pub digest: Vec<u8, Global>,
}
Expand description
Digest based identifier
Fields
derivator: DigestDerivator
digest: Vec<u8, Global>
Implementations
impl DigestIdentifier
impl DigestIdentifier
pub fn from_serializable<S>(data: &S) -> Result<DigestIdentifier, Error>where
S: Serialize,
pub fn from_serializable_borsh<T>(
serializable: T
) -> Result<DigestIdentifier, Error>where
T: BorshSerialize,
pub fn new(derivator: DigestDerivator, digest: &[u8]) -> DigestIdentifier
Trait Implementations
impl BorshDeserialize for DigestIdentifierwhere
DigestDerivator: BorshDeserialize,
Vec<u8, Global>: BorshDeserialize,
impl BorshDeserialize for DigestIdentifierwhere
DigestDerivator: BorshDeserialize,
Vec<u8, Global>: BorshDeserialize,
fn deserialize(buf: &mut &[u8]) -> Result<DigestIdentifier, Error>
fn deserialize(buf: &mut &[u8]) -> Result<DigestIdentifier, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes. Read more
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
impl BorshSerialize for DigestIdentifierwhere
DigestDerivator: BorshSerialize,
Vec<u8, Global>: BorshSerialize,
impl BorshSerialize for DigestIdentifierwhere
DigestDerivator: BorshSerialize,
Vec<u8, Global>: BorshSerialize,
impl Clone for DigestIdentifier
impl Clone for DigestIdentifier
fn clone(&self) -> DigestIdentifier
fn clone(&self) -> DigestIdentifier
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl Debug for DigestIdentifier
impl Debug for DigestIdentifier
impl Default for DigestIdentifier
impl Default for DigestIdentifier
fn default() -> DigestIdentifier
fn default() -> DigestIdentifier
Returns the “default value” for a type. Read more
impl Derivable for DigestIdentifier
impl Derivable for DigestIdentifier
impl<'de> Deserialize<'de> for DigestIdentifier
impl<'de> Deserialize<'de> for DigestIdentifier
fn deserialize<D>(
deserializer: D
) -> Result<DigestIdentifier, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<DigestIdentifier, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl FromStr for DigestIdentifier
impl FromStr for DigestIdentifier
From string to KeyIdentifier
fn from_str(
s: &str
) -> Result<DigestIdentifier, <DigestIdentifier as FromStr>::Err>
fn from_str(
s: &str
) -> Result<DigestIdentifier, <DigestIdentifier as FromStr>::Err>
Parses a string
s
to return a value of this type. Read moreimpl Hash for DigestIdentifier
impl Hash for DigestIdentifier
impl PartialEq<DigestIdentifier> for DigestIdentifier
impl PartialEq<DigestIdentifier> for DigestIdentifier
fn eq(&self, other: &DigestIdentifier) -> bool
fn eq(&self, other: &DigestIdentifier) -> bool
impl PartialOrd<DigestIdentifier> for DigestIdentifier
impl PartialOrd<DigestIdentifier> for DigestIdentifier
fn partial_cmp(&self, other: &DigestIdentifier) -> Option<Ordering>
fn partial_cmp(&self, other: &DigestIdentifier) -> Option<Ordering>
1.0.0 · sourcefn 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 moreimpl Serialize for DigestIdentifier
impl Serialize for DigestIdentifier
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for DigestIdentifier
impl StructuralEq for DigestIdentifier
impl StructuralPartialEq for DigestIdentifier
Auto Trait Implementations
impl RefUnwindSafe for DigestIdentifier
impl Send for DigestIdentifier
impl Sync for DigestIdentifier
impl Unpin for DigestIdentifier
impl UnwindSafe for DigestIdentifier
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.