embassy-usb

Crates

git

Versions

default

Flavors

Skip to main content

CcidWriter

Struct CcidWriter 

Source
pub struct CcidWriter<'d, D: Driver<'d>> { /* private fields */ }
Expand description

Sender handle for outgoing CCID messages and notifications to the host.

Implementations§

Source§

impl<'d, D: Driver<'d>> CcidWriter<'d, D>

Source

pub async fn wait_connection(&mut self)

Waits for the USB host to enable the Bulk IN endpoint.

Source

pub async fn send_data_block( &mut self, slot: u8, seq: u8, status: u8, error: u8, data: &[u8], ) -> Result<(), EndpointError>

Send an RDR_to_PC_DataBlock message containing data (such as ATR or APDU response).

Source

pub async fn send_slot_status( &mut self, slot: u8, seq: u8, status: u8, error: u8, clock_status: u8, ) -> Result<(), EndpointError>

Send an RDR_to_PC_SlotStatus message.

Source

pub async fn send_parameters( &mut self, slot: u8, seq: u8, status: u8, error: u8, protocol_num: u8, params: &[u8], ) -> Result<(), EndpointError>

Send an RDR_to_PC_Parameters message.

Source

pub async fn notify_slot_change( &mut self, slot: u8, card_present: bool, ) -> Result<(), EndpointError>

Send an RDR_to_PC_NotifySlotChange interrupt event.

Auto Trait Implementations§

§

impl<'d, D> Forget for CcidWriter<'d, D>

§

impl<'d, D> Freeze for CcidWriter<'d, D>
where <D as Driver<'d>>::EndpointIn: Freeze, Option<<D as Driver<'d>>::EndpointIn>: Freeze,

§

impl<'d, D> Move for CcidWriter<'d, D>

§

impl<'d, D> RefUnwindSafe for CcidWriter<'d, D>

§

impl<'d, D> Send for CcidWriter<'d, D>
where <D as Driver<'d>>::EndpointIn: Send, Option<<D as Driver<'d>>::EndpointIn>: Send,

§

impl<'d, D> Sync for CcidWriter<'d, D>
where <D as Driver<'d>>::EndpointIn: Sync, Option<<D as Driver<'d>>::EndpointIn>: Sync,

§

impl<'d, D> Unpin for CcidWriter<'d, D>
where <D as Driver<'d>>::EndpointIn: Unpin, Option<<D as Driver<'d>>::EndpointIn>: Unpin,

§

impl<'d, D> UnsafeUnpin for CcidWriter<'d, D>
where <D as Driver<'d>>::EndpointIn: UnsafeUnpin, Option<<D as Driver<'d>>::EndpointIn>: UnsafeUnpin,

§

impl<'d, D> UnwindSafe for CcidWriter<'d, D>
where <D as Driver<'d>>::EndpointIn: UnwindSafe, Option<<D as Driver<'d>>::EndpointIn>: UnwindSafe,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.