[][src]Struct yubikey_piv::certificate::Certificate

pub struct Certificate(_);

Certificates

Methods

impl Certificate[src]

pub fn read(yubikey: &mut YubiKey, slot: SlotId) -> Result<Self, Error>[src]

Read a certificate from the given slot in the YubiKey

pub fn write(
    &self,
    yubikey: &mut YubiKey,
    slot: SlotId,
    certinfo: u8
) -> Result<(), Error>
[src]

Write this certificate into the YubiKey in the given slot

pub fn delete(yubikey: &mut YubiKey, slot: SlotId) -> Result<(), Error>[src]

Delete a certificate located at the given slot of the given YubiKey

pub fn new(cert: impl Into<Zeroizing<Vec<u8>>>) -> Result<Self, Error>[src]

Initialize a local certificate struct from the given bytebuffer

pub fn into_buffer(self) -> Zeroizing<Vec<u8>>[src]

Extract the inner buffer

Trait Implementations

impl AsRef<[u8]> for Certificate[src]

impl Clone for Certificate[src]

impl Debug for Certificate[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self