pub enum CardState {
PresentActive,
PresentInactive,
NotPresent,
Reserved,
}Expand description
Smart-card presence reported by a CCID slot.
Variants§
PresentActive
A card is present and active.
PresentInactive
A card is present but inactive.
NotPresent
No card is present.
Reserved
The reader returned the reserved ICC status value.
Implementations§
Source§impl CardState
impl CardState
Sourcepub const fn to_icc_status(self) -> u8
pub const fn to_icc_status(self) -> u8
Return the 2-bit ICC status code corresponding to this state.
Sourcepub const fn from_icc_status(val: u8) -> Self
pub const fn from_icc_status(val: u8) -> Self
Decode the 2-bit ICC status code into a CardState.
Trait Implementations§
impl Copy for CardState
impl Eq for CardState
impl StructuralPartialEq for CardState
Auto Trait Implementations§
impl Forget for CardState
impl Freeze for CardState
impl Move for CardState
impl RefUnwindSafe for CardState
impl Send for CardState
impl Sync for CardState
impl Unpin for CardState
impl UnsafeUnpin for CardState
impl UnwindSafe for CardState
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