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
KeyIdentifier implementation
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 KeyIdentifier
impl BorshDeserialize for KeyIdentifier
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
Source§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.
Source§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 KeyIdentifier
impl BorshSerialize for KeyIdentifier
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
Derivable for KeyIdentifier
impl Derivable for KeyIdentifier
Derivable for KeyIdentifier
Source§impl<'de> Deserialize<'de> for KeyIdentifier
Serde compatible Deserialize
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 Display for KeyIdentifier
impl Display for KeyIdentifier
Source§impl FromStr for KeyIdentifier
From string to KeyIdentifier
impl FromStr for KeyIdentifier
From string to KeyIdentifier
Source§impl Hash for KeyIdentifier
impl Hash for KeyIdentifier
Source§impl PartialEq for KeyIdentifier
Partial equal for KeyIdentifier
impl PartialEq for KeyIdentifier
Partial equal for KeyIdentifier
Source§impl PartialOrd for KeyIdentifier
impl PartialOrd for KeyIdentifier
Source§impl Serialize for KeyIdentifier
Serde compatible Serialize
impl Serialize for KeyIdentifier
Serde compatible Serialize
impl Eq for KeyIdentifier
Auto Trait Implementations§
impl Freeze for KeyIdentifier
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<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more