Struct coins_ledger::common::APDUCommand[][src]

pub struct APDUCommand {
    pub ins: u8,
    pub p1: u8,
    pub p2: u8,
    pub data: APDUData,
    pub response_len: Option<u8>,
}

An APDU Command packet, used to issue instructions to the smart card. See wikipedia for additional format details

Fields

ins: u8

The instruction code.

p1: u8

Instruction parameter 1

p2: u8

Instruction parameter 2

data: APDUData

Command data

response_len: Option<u8>

The requested response length.

Implementations

impl APDUCommand[src]

pub fn serialized_length(&self) -> usize[src]

Return the serialized length of the APDU packet

pub fn write_to<W: Write>(&self, w: &mut W) -> Result<usize, Error>[src]

Write the APDU packet to the specified Write interface

pub fn serialize(&self) -> Vec<u8>[src]

Serialize the APDU to a vector

Trait Implementations

impl Clone for APDUCommand[src]

impl Debug for APDUCommand[src]

impl Eq for APDUCommand[src]

impl PartialEq<APDUCommand> for APDUCommand[src]

impl StructuralEq for APDUCommand[src]

impl StructuralPartialEq for APDUCommand[src]

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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<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.