pub struct RecipientPublicKey(/* private fields */);Expand description
A 32-byte X25519 recipient public key.
Implementations§
Source§impl RecipientPublicKey
impl RecipientPublicKey
Sourcepub fn from_bytes(b: [u8; 32]) -> Self
pub fn from_bytes(b: [u8; 32]) -> Self
Construct a recipient public key directly from its 32 raw bytes.
Sourcepub fn from_base64(s: &str) -> Result<Self, SealedError>
pub fn from_base64(s: &str) -> Result<Self, SealedError>
Decode a recipient public key from a standard-base64 (padded) string.
§Errors
Returns SealedError::Decode if the string is not valid base64, or
SealedError::InvalidLength if it does not decode to exactly 32 bytes.
Trait Implementations§
Source§impl Clone for RecipientPublicKey
impl Clone for RecipientPublicKey
Source§fn clone(&self) -> RecipientPublicKey
fn clone(&self) -> RecipientPublicKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RecipientPublicKey
impl Debug for RecipientPublicKey
Source§impl PartialEq for RecipientPublicKey
impl PartialEq for RecipientPublicKey
Source§fn eq(&self, other: &RecipientPublicKey) -> bool
fn eq(&self, other: &RecipientPublicKey) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for RecipientPublicKey
impl StructuralPartialEq for RecipientPublicKey
Auto Trait Implementations§
impl Freeze for RecipientPublicKey
impl RefUnwindSafe for RecipientPublicKey
impl Send for RecipientPublicKey
impl Sync for RecipientPublicKey
impl Unpin for RecipientPublicKey
impl UnsafeUnpin for RecipientPublicKey
impl UnwindSafe for RecipientPublicKey
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.