Struct matrix_sdk_crypto::olm::Curve25519PublicKey
source · [−]pub struct Curve25519PublicKey { /* private fields */ }Expand description
Struct representing a Curve25519 public key.
Implementations
sourceimpl Curve25519PublicKey
impl Curve25519PublicKey
sourcepub fn to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Convert the public key to a vector of bytes.
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(base64_key: &str) -> Result<Curve25519PublicKey, KeyError>
pub fn from_base64(base64_key: &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
sourceimpl Clone for Curve25519PublicKey
impl Clone for Curve25519PublicKey
sourcefn clone(&self) -> Curve25519PublicKey
fn clone(&self) -> Curve25519PublicKey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for Curve25519PublicKey
impl Debug for Curve25519PublicKey
sourceimpl<'de> Deserialize<'de> for Curve25519PublicKey
impl<'de> Deserialize<'de> for Curve25519PublicKey
sourcefn 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
sourceimpl Display for Curve25519PublicKey
impl Display for Curve25519PublicKey
sourceimpl<'a> From<&'a Curve25519SecretKey> for Curve25519PublicKey
impl<'a> From<&'a Curve25519SecretKey> for Curve25519PublicKey
sourcefn from(secret: &'a Curve25519SecretKey) -> Curve25519PublicKey
fn from(secret: &'a Curve25519SecretKey) -> Curve25519PublicKey
Converts to this type from the input type.
sourceimpl<'a> From<&'a EphemeralSecret> for Curve25519PublicKey
impl<'a> From<&'a EphemeralSecret> for Curve25519PublicKey
sourcefn from(secret: &'a EphemeralSecret) -> Curve25519PublicKey
fn from(secret: &'a EphemeralSecret) -> Curve25519PublicKey
Converts to this type from the input type.
sourceimpl<'a> From<&'a ReusableSecret> for Curve25519PublicKey
impl<'a> From<&'a ReusableSecret> for Curve25519PublicKey
sourcefn from(secret: &'a ReusableSecret) -> Curve25519PublicKey
fn from(secret: &'a ReusableSecret) -> Curve25519PublicKey
Converts to this type from the input type.
sourceimpl From<Curve25519PublicKey> for DeviceKey
impl From<Curve25519PublicKey> for DeviceKey
sourcefn from(val: Curve25519PublicKey) -> Self
fn from(val: Curve25519PublicKey) -> Self
Converts to this type from the input type.
sourceimpl Hash for Curve25519PublicKey
impl Hash for Curve25519PublicKey
sourceimpl PartialEq<Curve25519PublicKey> for Curve25519PublicKey
impl PartialEq<Curve25519PublicKey> for Curve25519PublicKey
sourcefn eq(&self, other: &Curve25519PublicKey) -> bool
fn eq(&self, other: &Curve25519PublicKey) -> bool
sourceimpl Serialize for Curve25519PublicKey
impl Serialize for Curve25519PublicKey
sourcefn 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 StructuralEq for Curve25519PublicKey
impl StructuralPartialEq for Curve25519PublicKey
Auto Trait Implementations
impl RefUnwindSafe for Curve25519PublicKey
impl Send for Curve25519PublicKey
impl Sync for Curve25519PublicKey
impl Unpin for Curve25519PublicKey
impl UnwindSafe for Curve25519PublicKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.