Struct iso7816::command::Command[][src]

pub struct Command<SIZE> where
    SIZE: ArrayLength<u8>, 
{ pub p1: u8, pub p2: u8, pub extended: bool, // some fields omitted }

Fields

p1: u8p2: u8extended: bool

Implementations

impl<SIZE> Command<SIZE> where
    SIZE: ArrayLength<u8>, 
[src]

pub fn try_from(apdu: &[u8]) -> Result<Self, FromSliceError>[src]

pub fn class(&self) -> Class[src]

pub fn instruction(&self) -> Instruction[src]

pub fn data(&self) -> &Bytes<SIZE>[src]

pub fn data_mut(&mut self) -> &mut Bytes<SIZE>[src]

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

pub fn extend_from_command(
    &mut self,
    command: &Command<impl ArrayLength<u8>>
) -> Result<(), ()>
[src]

This can be use for APDU chaining to convert multiple APDU’s into one.

  • Global Platform GPC_SPE_055 3.10

Trait Implementations

impl<SIZE: Clone> Clone for Command<SIZE> where
    SIZE: ArrayLength<u8>, 
[src]

fn clone(&self) -> Command<SIZE>[src]

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl<SIZE: Debug> Debug for Command<SIZE> where
    SIZE: ArrayLength<u8>, 
[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<SIZE: PartialEq> PartialEq<Command<SIZE>> for Command<SIZE> where
    SIZE: ArrayLength<u8>, 
[src]

fn eq(&self, other: &Command<SIZE>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Command<SIZE>) -> bool[src]

This method tests for !=.

impl<SIZE> TryFrom<&'_ [u8]> for Command<SIZE> where
    SIZE: ArrayLength<u8>, 
[src]

type Error = FromSliceError

The type returned in the event of a conversion error.

fn try_from(apdu: &[u8]) -> Result<Self, Self::Error>[src]

Performs the conversion.

impl<SIZE: Eq> Eq for Command<SIZE> where
    SIZE: ArrayLength<u8>, 
[src]

impl<SIZE> StructuralEq for Command<SIZE> where
    SIZE: ArrayLength<u8>, 
[src]

impl<SIZE> StructuralPartialEq for Command<SIZE> where
    SIZE: ArrayLength<u8>, 
[src]

Auto Trait Implementations

impl<SIZE> Send for Command<SIZE>

impl<SIZE> Sync for Command<SIZE>

impl<SIZE> Unpin for Command<SIZE> where
    <SIZE as ArrayLength<u8>>::ArrayType: Unpin

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.