pub struct TwistedEd25519PublicKey { /* private fields */ }Available on crate feature
twisted_ed25519 only.Expand description
A Twisted Ed25519 public (encryption) key — a Ristretto255 point.
Implementations§
Source§impl TwistedEd25519PublicKey
impl TwistedEd25519PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> MovementResult<Self>
pub fn from_bytes(bytes: &[u8; 32]) -> MovementResult<Self>
Decodes a public key from a 32-byte compressed Ristretto255 encoding.
§Errors
Returns MovementError::InvalidPublicKey if the bytes are not a valid
canonical Ristretto255 encoding.
Sourcepub fn from_point(point: RistrettoPoint) -> Self
pub fn from_point(point: RistrettoPoint) -> Self
Wraps an existing Ristretto255 point as a public key.
Trait Implementations§
Source§impl Clone for TwistedEd25519PublicKey
impl Clone for TwistedEd25519PublicKey
Source§fn clone(&self) -> TwistedEd25519PublicKey
fn clone(&self) -> TwistedEd25519PublicKey
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 TwistedEd25519PublicKey
impl Debug for TwistedEd25519PublicKey
Source§impl PartialEq for TwistedEd25519PublicKey
impl PartialEq for TwistedEd25519PublicKey
impl Eq for TwistedEd25519PublicKey
impl StructuralPartialEq for TwistedEd25519PublicKey
Auto Trait Implementations§
impl Freeze for TwistedEd25519PublicKey
impl RefUnwindSafe for TwistedEd25519PublicKey
impl Send for TwistedEd25519PublicKey
impl Sync for TwistedEd25519PublicKey
impl Unpin for TwistedEd25519PublicKey
impl UnsafeUnpin for TwistedEd25519PublicKey
impl UnwindSafe for TwistedEd25519PublicKey
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.