pub struct RecipientPubKey(/* private fields */);Expand description
X25519 public key for ECIES encryption (32 bytes).
Serializes to/from hex string in JSON.
Implementations§
Source§impl RecipientPubKey
impl RecipientPubKey
Sourcepub fn from_bytes(bytes: [u8; 32]) -> RecipientPubKey
pub fn from_bytes(bytes: [u8; 32]) -> RecipientPubKey
Create from raw bytes.
Sourcepub fn from_hex(s: &str) -> Result<RecipientPubKey, ParseError>
pub fn from_hex(s: &str) -> Result<RecipientPubKey, ParseError>
Parse from hex string.
Trait Implementations§
Source§impl Clone for RecipientPubKey
impl Clone for RecipientPubKey
Source§fn clone(&self) -> RecipientPubKey
fn clone(&self) -> RecipientPubKey
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 RecipientPubKey
impl Debug for RecipientPubKey
Source§impl<'de> Deserialize<'de> for RecipientPubKey
impl<'de> Deserialize<'de> for RecipientPubKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<RecipientPubKey, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<RecipientPubKey, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RecipientPubKey
impl Display for RecipientPubKey
Source§impl Hash for RecipientPubKey
impl Hash for RecipientPubKey
Source§impl PartialEq for RecipientPubKey
impl PartialEq for RecipientPubKey
Source§impl Serialize for RecipientPubKey
impl Serialize for RecipientPubKey
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 Copy for RecipientPubKey
impl Eq for RecipientPubKey
impl StructuralPartialEq for RecipientPubKey
Auto Trait Implementations§
impl Freeze for RecipientPubKey
impl RefUnwindSafe for RecipientPubKey
impl Send for RecipientPubKey
impl Sync for RecipientPubKey
impl Unpin for RecipientPubKey
impl UnsafeUnpin for RecipientPubKey
impl UnwindSafe for RecipientPubKey
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<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