Struct matrix_sdk_crypto::olm::Curve25519PublicKey
source · 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§fn eq(&self, other: &Curve25519PublicKey) -> bool
fn eq(&self, other: &Curve25519PublicKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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