Struct Header

Source
#[repr(C, packed(1))]
pub struct Header { pub bMessageType: MessageType, pub dwLength: u32, pub bSlot: u8, pub bSeq: u8, pub abRFU: [u8; 3], }
Expand description

Generic CCID message header

Fields§

§bMessageType: MessageType

The message type (bMessageType) identifies the message.

§dwLength: u32

The length field (dwLength) is the length of the message not including the 10-byte header.

§bSlot: u8

Identifies the slot number for this command

The slot number (bSlot) identifies which ICC slot is being addressed by the message, if the CCID supports multiple slots. The slot number is zero-relative, and is in the range of zero to FFh.

§bSeq: u8

Sequence number for command

The sequence number (bSeq) is a monotonically increasing by one counter of bulk messages sent to the CCID. Because the response to a command always uses the exact same sequence number contained in the command, the host can use the sequence number in a response message to verify that a particular response is the one expected in reply to a particular command. This sequence number is not related to any interaction between the CCID and the ICC itself, but simply tracks the USB bulk message exchanges between the host and the CCID. The initial value of the sequence number is not important, but typically starts at zero.

§abRFU: [u8; 3]

Reserved for Future Use

Auto Trait Implementations§

§

impl Freeze for Header

§

impl RefUnwindSafe for Header

§

impl Send for Header

§

impl Sync for Header

§

impl Unpin for Header

§

impl UnwindSafe for Header

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.