pub struct SelfAddressingIdentifier {
pub derivation: HashFunction,
pub digest: Vec<u8>,
}Expand description
Self Addressing Identifier
Self-addressing is a digest/hash of data.
Fields§
§derivation: HashFunctionHash algorithm used for computing digest
digest: Vec<u8>Computed digest
Implementations§
Source§impl SelfAddressingIdentifier
impl SelfAddressingIdentifier
pub fn new(code: HashFunction, digest: Vec<u8>) -> SelfAddressingIdentifier
pub fn verify_binding(&self, sed: &[u8]) -> bool
Trait Implementations§
Source§impl CesrPrimitive for SelfAddressingIdentifier
impl CesrPrimitive for SelfAddressingIdentifier
fn derivative(&self) -> Vec<u8> ⓘ
fn derivation_code(&self) -> PrimitiveCode
fn to_str(&self) -> String
Source§impl Clone for SelfAddressingIdentifier
impl Clone for SelfAddressingIdentifier
Source§fn clone(&self) -> SelfAddressingIdentifier
fn clone(&self) -> SelfAddressingIdentifier
Returns a duplicate 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 SelfAddressingIdentifier
impl Debug for SelfAddressingIdentifier
Source§impl Default for SelfAddressingIdentifier
impl Default for SelfAddressingIdentifier
Source§fn default() -> SelfAddressingIdentifier
fn default() -> SelfAddressingIdentifier
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SelfAddressingIdentifier
Serde compatible Deserialize
impl<'de> Deserialize<'de> for SelfAddressingIdentifier
Serde compatible Deserialize
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SelfAddressingIdentifier, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<SelfAddressingIdentifier, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SelfAddressingIdentifier
impl Display for SelfAddressingIdentifier
Source§impl From<(SelfAddressing, Vec<u8>)> for SelfAddressingIdentifier
impl From<(SelfAddressing, Vec<u8>)> for SelfAddressingIdentifier
Source§fn from(_: (SelfAddressing, Vec<u8>)) -> SelfAddressingIdentifier
fn from(_: (SelfAddressing, Vec<u8>)) -> SelfAddressingIdentifier
Converts to this type from the input type.
Source§impl FromStr for SelfAddressingIdentifier
impl FromStr for SelfAddressingIdentifier
Source§impl Hash for SelfAddressingIdentifier
impl Hash for SelfAddressingIdentifier
Source§impl PartialEq for SelfAddressingIdentifier
impl PartialEq for SelfAddressingIdentifier
Source§impl Serialize for SelfAddressingIdentifier
Serde compatible Serialize
impl Serialize for SelfAddressingIdentifier
Serde compatible Serialize
Source§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 SelfAddressingIdentifier
impl StructuralPartialEq for SelfAddressingIdentifier
Auto Trait Implementations§
impl Freeze for SelfAddressingIdentifier
impl RefUnwindSafe for SelfAddressingIdentifier
impl Send for SelfAddressingIdentifier
impl Sync for SelfAddressingIdentifier
impl Unpin for SelfAddressingIdentifier
impl UnsafeUnpin for SelfAddressingIdentifier
impl UnwindSafe for SelfAddressingIdentifier
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.