Struct taple_core::identifier::KeyIdentifier
source · pub struct KeyIdentifier {
pub public_key: Vec<u8>,
pub derivator: KeyDerivator,
}
Expand description
Key based identifier
Fields§
§public_key: Vec<u8>
§derivator: KeyDerivator
Implementations§
source§impl KeyIdentifier
impl KeyIdentifier
KeyIdentifier implementation
pub fn new(derivator: KeyDerivator, pk: &[u8]) -> Self
pub fn to_signature_derivator(&self) -> SignatureDerivator
pub fn verify( &self, data: &[u8], signature: &SignatureIdentifier ) -> Result<(), Error>
Trait Implementations§
source§impl BorshDeserialize for KeyIdentifierwhere
Vec<u8>: BorshDeserialize,
KeyDerivator: BorshDeserialize,
impl BorshDeserialize for KeyIdentifierwhere Vec<u8>: BorshDeserialize, KeyDerivator: 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 KeyIdentifierwhere
Vec<u8>: BorshSerialize,
KeyDerivator: BorshSerialize,
impl BorshSerialize for KeyIdentifierwhere Vec<u8>: BorshSerialize, KeyDerivator: BorshSerialize,
source§impl Clone for KeyIdentifier
impl Clone for KeyIdentifier
source§fn clone(&self) -> KeyIdentifier
fn clone(&self) -> KeyIdentifier
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 KeyIdentifier
impl Debug for KeyIdentifier
source§impl Derivable for KeyIdentifier
impl Derivable for KeyIdentifier
Derivable for KeyIdentifier
source§impl<'de> Deserialize<'de> for KeyIdentifier
impl<'de> Deserialize<'de> for KeyIdentifier
Serde compatible Deserialize
source§fn deserialize<D>(deserializer: D) -> Result<KeyIdentifier, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<KeyIdentifier, D::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl FromStr for KeyIdentifier
impl FromStr for KeyIdentifier
From string to KeyIdentifier
source§impl Hash for KeyIdentifier
impl Hash for KeyIdentifier
source§impl PartialEq<KeyIdentifier> for KeyIdentifier
impl PartialEq<KeyIdentifier> for KeyIdentifier
Partial equal for KeyIdentifier
source§impl PartialOrd<KeyIdentifier> for KeyIdentifier
impl PartialOrd<KeyIdentifier> for KeyIdentifier
source§fn partial_cmp(&self, other: &KeyIdentifier) -> Option<Ordering>
fn partial_cmp(&self, other: &KeyIdentifier) -> 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 KeyIdentifier
impl Serialize for KeyIdentifier
Serde compatible Serialize
impl Eq for KeyIdentifier
impl StructuralEq for KeyIdentifier
Auto Trait Implementations§
impl RefUnwindSafe for KeyIdentifier
impl Send for KeyIdentifier
impl Sync for KeyIdentifier
impl Unpin for KeyIdentifier
impl UnwindSafe for KeyIdentifier
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.