pub struct CcidReader<'d, D: Driver<'d>> { /* private fields */ }Expand description
Receiver handle for incoming CCID messages from the host.
Implementations§
Source§impl<'d, D: Driver<'d>> CcidReader<'d, D>
impl<'d, D: Driver<'d>> CcidReader<'d, D>
Sourcepub async fn wait_connection(&mut self)
pub async fn wait_connection(&mut self)
Waits for the USB host to enable the Bulk OUT endpoint.
Sourcepub async fn read_message(
&mut self,
buf: &mut [u8],
) -> Result<usize, EndpointError>
pub async fn read_message( &mut self, buf: &mut [u8], ) -> Result<usize, EndpointError>
Read a raw message from the host over the Bulk OUT endpoint.
Sourcepub async fn read_command<'a>(
&mut self,
buf: &'a mut [u8],
) -> Result<CcidCommand<'a>, EndpointError>
pub async fn read_command<'a>( &mut self, buf: &'a mut [u8], ) -> Result<CcidCommand<'a>, EndpointError>
Read and decode the next CCID command from the host into buf.
buf must be large enough to hold the complete CCID message (at least 10 bytes).
Auto Trait Implementations§
impl<'d, D> Forget for CcidReader<'d, D>
impl<'d, D> Freeze for CcidReader<'d, D>
impl<'d, D> Move for CcidReader<'d, D>
impl<'d, D> RefUnwindSafe for CcidReader<'d, D>
impl<'d, D> Send for CcidReader<'d, D>
impl<'d, D> Sync for CcidReader<'d, D>
impl<'d, D> Unpin for CcidReader<'d, D>
impl<'d, D> UnsafeUnpin for CcidReader<'d, D>
impl<'d, D> UnwindSafe for CcidReader<'d, D>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more