pub struct Curve25519PublicKey { /* private fields */ }
Expand description
Struct representing a Curve25519 public key.
Implementations§
Source§impl Curve25519PublicKey
impl Curve25519PublicKey
Sourcepub fn from_bytes(bytes: [u8; 32]) -> Curve25519PublicKey
pub fn from_bytes(bytes: [u8; 32]) -> Curve25519PublicKey
Create a Curve25519PublicKey
from a byte array.
Sourcepub fn from_base64(input: &str) -> Result<Curve25519PublicKey, KeyError>
pub fn from_base64(input: &str) -> Result<Curve25519PublicKey, KeyError>
Instantiate a Curve25519 public key from an unpadded base64 representation.
Sourcepub fn from_slice(slice: &[u8]) -> Result<Curve25519PublicKey, KeyError>
pub fn from_slice(slice: &[u8]) -> Result<Curve25519PublicKey, KeyError>
Try to create a Curve25519PublicKey
from a slice of bytes.
Trait Implementations§
Source§impl Clone for Curve25519PublicKey
impl Clone for Curve25519PublicKey
Source§fn clone(&self) -> Curve25519PublicKey
fn clone(&self) -> Curve25519PublicKey
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 Curve25519PublicKey
impl Debug for Curve25519PublicKey
Source§impl Decode for Curve25519PublicKey
impl Decode for Curve25519PublicKey
Source§fn decode(reader: &mut impl Read) -> Result<Curve25519PublicKey, DecodeError>
fn decode(reader: &mut impl Read) -> Result<Curve25519PublicKey, DecodeError>
Try to read and decode a value from the given reader.
Source§fn decode_from_slice(buffer: &[u8]) -> Result<Self, DecodeError>where
Self: Sized,
fn decode_from_slice(buffer: &[u8]) -> Result<Self, DecodeError>where
Self: Sized,
Try to read and decode a value from the given byte slice.
Source§impl<'de> Deserialize<'de> for Curve25519PublicKey
impl<'de> Deserialize<'de> for Curve25519PublicKey
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Curve25519PublicKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Curve25519PublicKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Curve25519PublicKey
impl Display for Curve25519PublicKey
Source§impl<'a> From<&'a Curve25519SecretKey> for Curve25519PublicKey
impl<'a> From<&'a Curve25519SecretKey> for Curve25519PublicKey
Source§fn from(secret: &'a Curve25519SecretKey) -> Curve25519PublicKey
fn from(secret: &'a Curve25519SecretKey) -> Curve25519PublicKey
Converts to this type from the input type.
Source§impl<'a> From<&'a EphemeralSecret> for Curve25519PublicKey
impl<'a> From<&'a EphemeralSecret> for Curve25519PublicKey
Source§fn from(secret: &'a EphemeralSecret) -> Curve25519PublicKey
fn from(secret: &'a EphemeralSecret) -> Curve25519PublicKey
Converts to this type from the input type.
Source§impl<'a> From<&'a ReusableSecret> for Curve25519PublicKey
impl<'a> From<&'a ReusableSecret> for Curve25519PublicKey
Source§fn from(secret: &'a ReusableSecret) -> Curve25519PublicKey
fn from(secret: &'a ReusableSecret) -> Curve25519PublicKey
Converts to this type from the input type.
Source§impl From<Curve25519PublicKey> for DeviceKey
impl From<Curve25519PublicKey> for DeviceKey
Source§fn from(val: Curve25519PublicKey) -> Self
fn from(val: Curve25519PublicKey) -> Self
Converts to this type from the input type.
Source§impl Hash for Curve25519PublicKey
impl Hash for Curve25519PublicKey
Source§impl PartialEq for Curve25519PublicKey
impl PartialEq for Curve25519PublicKey
Source§impl Serialize for Curve25519PublicKey
impl Serialize for Curve25519PublicKey
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 Curve25519PublicKey
impl Eq for Curve25519PublicKey
impl StructuralPartialEq for Curve25519PublicKey
Auto Trait Implementations§
impl Freeze for Curve25519PublicKey
impl RefUnwindSafe for Curve25519PublicKey
impl Send for Curve25519PublicKey
impl Sync for Curve25519PublicKey
impl Unpin for Curve25519PublicKey
impl UnwindSafe for Curve25519PublicKey
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.Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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