pub struct CcidHost<'d, A: UsbHostAllocator<'d>> { /* private fields */ }Expand description
Host driver for one USB CCID interface.
Implementations§
Source§impl<'d, A: UsbHostAllocator<'d>> CcidHost<'d, A>
impl<'d, A: UsbHostAllocator<'d>> CcidHost<'d, A>
Sourcepub fn new(
alloc: &A,
config_desc: &[u8],
enum_info: &EnumerationInfo,
) -> Result<Self, CcidError>
pub fn new( alloc: &A, config_desc: &[u8], enum_info: &EnumerationInfo, ) -> Result<Self, CcidError>
Discover the CCID interface and allocate its bulk pipes.
Sourcepub async fn get_slot_status(
&mut self,
slot: u8,
) -> Result<SlotStatus, CcidError>
pub async fn get_slot_status( &mut self, slot: u8, ) -> Result<SlotStatus, CcidError>
Query one reader slot without changing card power or protocol state.
Sourcepub async fn power_off(&mut self, slot: u8) -> Result<SlotStatus, CcidError>
pub async fn power_off(&mut self, slot: u8) -> Result<SlotStatus, CcidError>
Power off one ICC slot.
Trait Implementations§
Source§impl<'d, A: UsbHostAllocator<'d>> HostClass<'d, A> for CcidHost<'d, A>
impl<'d, A: UsbHostAllocator<'d>> HostClass<'d, A> for CcidHost<'d, A>
Source§type Info = CcidInfo
type Info = CcidInfo
Cheap, owned description of the interface(s) and endpoints to use. Read more
Source§fn probe(_enum_info: &EnumerationInfo, cfg: &[u8]) -> Option<Self::Info>
fn probe(_enum_info: &EnumerationInfo, cfg: &[u8]) -> Option<Self::Info>
Find the class in an enumerated device. Returns
None when the class is
not present. This must not allocate pipes or issue control requests. Read moreSource§async fn open(
alloc: &A,
cfg: &[u8],
_info: Self::Info,
enum_info: &EnumerationInfo,
) -> Result<Self, ClassError>
async fn open( alloc: &A, cfg: &[u8], _info: Self::Info, enum_info: &EnumerationInfo, ) -> Result<Self, ClassError>
Allocate pipes and perform any class-specific setup.
Source§fn is_present(enum_info: &EnumerationInfo, cfg: &[u8]) -> bool
fn is_present(enum_info: &EnumerationInfo, cfg: &[u8]) -> bool
Convenience wrapper around
probe.Auto Trait Implementations§
impl<'d, A> Forget for CcidHost<'d, A>
impl<'d, A> Freeze for CcidHost<'d, A>where
<A as UsbHostAllocator<'d>>::Pipe<Bulk, In>: Freeze,
<A as UsbHostAllocator<'d>>::Pipe<Bulk, Out>: Freeze,
impl<'d, A> Move for CcidHost<'d, A>
impl<'d, A> RefUnwindSafe for CcidHost<'d, A>where
<A as UsbHostAllocator<'d>>::Pipe<Bulk, In>: RefUnwindSafe,
<A as UsbHostAllocator<'d>>::Pipe<Bulk, Out>: RefUnwindSafe,
impl<'d, A> Send for CcidHost<'d, A>where
<A as UsbHostAllocator<'d>>::Pipe<Bulk, In>: Send,
<A as UsbHostAllocator<'d>>::Pipe<Bulk, Out>: Send,
impl<'d, A> Sync for CcidHost<'d, A>where
<A as UsbHostAllocator<'d>>::Pipe<Bulk, In>: Sync,
<A as UsbHostAllocator<'d>>::Pipe<Bulk, Out>: Sync,
impl<'d, A> Unpin for CcidHost<'d, A>where
<A as UsbHostAllocator<'d>>::Pipe<Bulk, In>: Unpin,
<A as UsbHostAllocator<'d>>::Pipe<Bulk, Out>: Unpin,
impl<'d, A> UnsafeUnpin for CcidHost<'d, A>where
<A as UsbHostAllocator<'d>>::Pipe<Bulk, In>: UnsafeUnpin,
<A as UsbHostAllocator<'d>>::Pipe<Bulk, Out>: UnsafeUnpin,
impl<'d, A> UnwindSafe for CcidHost<'d, A>where
<A as UsbHostAllocator<'d>>::Pipe<Bulk, In>: UnwindSafe,
<A as UsbHostAllocator<'d>>::Pipe<Bulk, Out>: UnwindSafe,
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