Struct threema_gateway::PublicKey
source · pub struct PublicKey(/* private fields */);
Expand description
A crypto_box
public key.
This type can be serialized if the serde
feature is enabled.
Implementations§
source§impl PublicKey
impl PublicKey
sourcepub fn from_slice(slice: &[u8]) -> Result<PublicKey, TryFromSliceError>
pub fn from_slice(slice: &[u8]) -> Result<PublicKey, TryFromSliceError>
Initialize PublicKey
from a byte slice.
Returns TryFromSliceError
if the slice length is not exactly equal
to KEY_SIZE
.
Trait Implementations§
source§impl From<MontgomeryPoint> for PublicKey
impl From<MontgomeryPoint> for PublicKey
source§fn from(value: MontgomeryPoint) -> PublicKey
fn from(value: MontgomeryPoint) -> PublicKey
Converts to this type from the input type.
source§impl From<PublicKey> for RecipientKey
impl From<PublicKey> for RecipientKey
source§impl Ord for PublicKey
impl Ord for PublicKey
source§impl PartialEq for PublicKey
impl PartialEq for PublicKey
source§impl PartialOrd for PublicKey
impl PartialOrd for PublicKey
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<&[u8]> for PublicKey
impl TryFrom<&[u8]> for PublicKey
§type Error = TryFromSliceError
type Error = TryFromSliceError
The type returned in the event of a conversion error.
impl Eq for PublicKey
impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
impl Freeze for PublicKey
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnwindSafe for PublicKey
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.