[][src]Struct yubikey_piv::mscmap::Container

pub struct Container {
    pub name: [u16; 40],
    pub slot: SlotId,
    pub key_spec: u8,
    pub key_size_bits: u16,
    pub flags: u8,
    pub pin_id: u8,
    pub associated_echd_container: u8,
    pub cert_fingerprint: [u8; 20],
}

MS Container Map(?) Records

Fields

name: [u16; 40]

Container name

slot: SlotId

Card slot

key_spec: u8

Key spec

key_size_bits: u16

Key size in bits

flags: u8

Flags

pin_id: u8

PIN ID

associated_echd_container: u8

Associated ECHD(?) container (typo of "ecdh" perhaps?)

cert_fingerprint: [u8; 20]

Cert fingerprint

Implementations

impl Container[src]

pub fn read_mscmap(yubikey: &mut YubiKey) -> Result<Vec<Self>, Error>[src]

Read MS Container Map records

pub fn write_mscmap(
    yubikey: &mut YubiKey,
    containers: &[Self]
) -> Result<(), Error>
[src]

Write MS Container Map records.

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

Parse a container record from a byte slice

pub fn parse_name(&self) -> Result<String, Error>[src]

Parse the container name as a UTF-16 string

pub fn to_bytes(&self) -> [u8; 107][src]

Serialize a container record as a byte size

Trait Implementations

impl Clone for Container[src]

impl Copy for Container[src]

impl Debug for Container[src]

impl<'a> TryFrom<&'a [u8]> for Container[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> Conv for T

impl<T> FmtForward for T

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

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

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

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<V, T> VZip<V> for T where
    V: MultiLane<T>,