Struct taple_core::DigestIdentifier
source · pub struct DigestIdentifier {
pub derivator: DigestDerivator,
pub digest: Vec<u8>,
}
Expand description
Digest based identifier
Fields§
§derivator: DigestDerivator
§digest: Vec<u8>
Implementations§
source§impl DigestIdentifier
impl DigestIdentifier
pub fn from_serializable<S: Serialize>(data: &S) -> Result<Self, Error>
pub fn from_serializable_borsh<T: BorshSerialize>( serializable: T ) -> Result<Self, Error>
pub fn new(derivator: DigestDerivator, digest: &[u8]) -> Self
Trait Implementations§
source§impl BorshDeserialize for DigestIdentifierwhere
DigestDerivator: BorshDeserialize,
Vec<u8>: BorshDeserialize,
impl BorshDeserialize for DigestIdentifierwhere DigestDerivator: BorshDeserialize, Vec<u8>: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§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.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where R: Read,
source§impl BorshSerialize for DigestIdentifierwhere
DigestDerivator: BorshSerialize,
Vec<u8>: BorshSerialize,
impl BorshSerialize for DigestIdentifierwhere DigestDerivator: BorshSerialize, Vec<u8>: BorshSerialize,
source§impl Clone for DigestIdentifier
impl Clone for DigestIdentifier
source§fn clone(&self) -> DigestIdentifier
fn clone(&self) -> DigestIdentifier
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DigestIdentifier
impl Debug for DigestIdentifier
source§impl Default for DigestIdentifier
impl Default for DigestIdentifier
source§impl Derivable for DigestIdentifier
impl Derivable for DigestIdentifier
source§impl<'de> Deserialize<'de> for DigestIdentifier
impl<'de> Deserialize<'de> for DigestIdentifier
source§fn deserialize<D>(deserializer: D) -> Result<DigestIdentifier, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<DigestIdentifier, D::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl FromStr for DigestIdentifier
impl FromStr for DigestIdentifier
From string to KeyIdentifier
source§impl Hash for DigestIdentifier
impl Hash for DigestIdentifier
source§impl PartialEq<DigestIdentifier> for DigestIdentifier
impl PartialEq<DigestIdentifier> for DigestIdentifier
source§fn eq(&self, other: &DigestIdentifier) -> bool
fn eq(&self, other: &DigestIdentifier) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<DigestIdentifier> for DigestIdentifier
impl PartialOrd<DigestIdentifier> for DigestIdentifier
source§fn partial_cmp(&self, other: &DigestIdentifier) -> Option<Ordering>
fn partial_cmp(&self, other: &DigestIdentifier) -> Option<Ordering>
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 Serialize for DigestIdentifier
impl Serialize for DigestIdentifier
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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.