[][src]Struct saber::lightsaber::SecretKey

#[repr(C)]
pub struct SecretKey { /* fields omitted */ }

A saber secret key

Secret keys also contain their respective public keys. These can be obtained using SecretKey::public_key().

Methods

impl SecretKey[src]

pub fn public_key(&self) -> &PublicKey[src]

Retrieve a reference to the public key that is contained in this secret key.

pub fn to_bytes(&self) -> SecretKeyBytes[src]

Serialize this secret key into bytes format.

pub fn from_bytes(bytes: &[u8]) -> Result<SecretKey, Error>[src]

Parse the secret key in bytes.

Returns

Trait Implementations

impl Clone for SecretKey[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> From<&'a SecretKey> for &'a PublicKey[src]

impl<'_> From<&'_ SecretKeyBytes> for SecretKey[src]

Auto Trait Implementations

impl Send for SecretKey

impl Sync for SecretKey

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Same for T[src]

type Output = T

Should always be Self