pub struct Ed25519Keypair {
pub public: Ed25519PublicKey,
pub private: Ed25519PrivateKey,
}
Expand description
Ed25519 private/public keypair.
Fields§
§public: Ed25519PublicKey
Public key.
private: Ed25519PrivateKey
Private key.
Implementations§
Source§impl Ed25519Keypair
impl Ed25519Keypair
Sourcepub fn from_bytes(bytes: &[u8; 64]) -> Result<Self>
pub fn from_bytes(bytes: &[u8; 64]) -> Result<Self>
Parse Ed25519 keypair from 64-bytes which comprise the serialized private and public keys.
Trait Implementations§
Source§impl Clone for Ed25519Keypair
impl Clone for Ed25519Keypair
Source§fn clone(&self) -> Ed25519Keypair
fn clone(&self) -> Ed25519Keypair
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 ConstantTimeEq for Ed25519Keypair
impl ConstantTimeEq for Ed25519Keypair
Source§impl Debug for Ed25519Keypair
impl Debug for Ed25519Keypair
Source§impl Decode for Ed25519Keypair
impl Decode for Ed25519Keypair
Source§impl Encode for Ed25519Keypair
impl Encode for Ed25519Keypair
Source§fn encoded_len(&self) -> Result<usize>
fn encoded_len(&self) -> Result<usize>
Get the length of this type encoded in bytes, prior to Base64 encoding.
Source§fn encode(&self, writer: &mut impl Writer) -> Result<()>
fn encode(&self, writer: &mut impl Writer) -> Result<()>
Encode this value using the provided
Writer
.Source§fn encoded_len_prefixed(&self) -> Result<usize, Error>
fn encoded_len_prefixed(&self) -> Result<usize, Error>
Return the length of this type after encoding when prepended with a
uint32
length prefix.Source§fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value, first prepending a
uint32
length prefix
set to Encode::encoded_len
.Source§impl From<&Ed25519Keypair> for Ed25519PublicKey
impl From<&Ed25519Keypair> for Ed25519PublicKey
Source§fn from(keypair: &Ed25519Keypair) -> Ed25519PublicKey
fn from(keypair: &Ed25519Keypair) -> Ed25519PublicKey
Converts to this type from the input type.
Source§impl From<Ed25519Keypair> for Ed25519PublicKey
impl From<Ed25519Keypair> for Ed25519PublicKey
Source§fn from(keypair: Ed25519Keypair) -> Ed25519PublicKey
fn from(keypair: Ed25519Keypair) -> Ed25519PublicKey
Converts to this type from the input type.
Source§impl From<Ed25519Keypair> for KeypairData
impl From<Ed25519Keypair> for KeypairData
Source§fn from(keypair: Ed25519Keypair) -> KeypairData
fn from(keypair: Ed25519Keypair) -> KeypairData
Converts to this type from the input type.
Source§impl From<Ed25519Keypair> for PrivateKey
impl From<Ed25519Keypair> for PrivateKey
Source§fn from(keypair: Ed25519Keypair) -> PrivateKey
fn from(keypair: Ed25519Keypair) -> PrivateKey
Converts to this type from the input type.
Source§impl PartialEq for Ed25519Keypair
impl PartialEq for Ed25519Keypair
Source§impl TryFrom<&[u8]> for Ed25519Keypair
impl TryFrom<&[u8]> for Ed25519Keypair
impl Eq for Ed25519Keypair
Auto Trait Implementations§
impl Freeze for Ed25519Keypair
impl RefUnwindSafe for Ed25519Keypair
impl Send for Ed25519Keypair
impl Sync for Ed25519Keypair
impl Unpin for Ed25519Keypair
impl UnwindSafe for Ed25519Keypair
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,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 64 bytes