pub struct CardCaps { /* private fields */ }
Expand description
Information about the capabilities of a card.
CardCaps is used to signal capabilities (chaining, extended length support, max command/response sizes, max PIN lengths) of the current card to backends.
CardCaps is not intended for users of this library.
(The information is gathered from the “Card Capabilities”, “Extended length information” and “PWStatus” DOs)
Implementations§
Source§impl CardCaps
impl CardCaps
pub fn new( ext_support: bool, chaining_support: bool, max_cmd_bytes: u16, max_rsp_bytes: u16, pw1_max_len: u8, pw3_max_len: u8, ) -> Self
Sourcepub fn ext_support(&self) -> bool
pub fn ext_support(&self) -> bool
Does the card support extended Lc and Le fields?
Sourcepub fn chaining_support(&self) -> bool
pub fn chaining_support(&self) -> bool
Does the card support command chaining?
Sourcepub fn max_cmd_bytes(&self) -> u16
pub fn max_cmd_bytes(&self) -> u16
Maximum number of bytes in a command APDU
Sourcepub fn max_rsp_bytes(&self) -> u16
pub fn max_rsp_bytes(&self) -> u16
Maximum number of bytes in a response APDU
Sourcepub fn pw1_max_len(&self) -> u8
pub fn pw1_max_len(&self) -> u8
Maximum length of PW1
Sourcepub fn pw3_max_len(&self) -> u8
pub fn pw3_max_len(&self) -> u8
Maximum length of PW3
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CardCaps
impl RefUnwindSafe for CardCaps
impl Send for CardCaps
impl Sync for CardCaps
impl Unpin for CardCaps
impl UnwindSafe for CardCaps
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