pub struct ISO7816ResponseAPDU {
pub data: Vec<u8>,
pub sw1: u8,
pub sw2: u8,
}
Available on crate feature
ctap2
only.Expand description
ISO/IEC 7816-4 response APDU.
Fields§
§data: Vec<u8>
Response data field.
sw1: u8
Status byte 1 (SW1
, ISO/IEC 7816-4:2005 §5.1.3).
sw2: u8
Status byte 2 (SW2
, ISO/IEC 7816-4:2005 §5.1.3).
Implementations§
source§impl ISO7816ResponseAPDU
impl ISO7816ResponseAPDU
sourcepub fn bytes_available(&self) -> usize
pub fn bytes_available(&self) -> usize
Non-zero if the card responded that further data bytes are available
(61 XX
), which can be retrieved with get_response()
.
sourcepub fn ctap_needs_get_response(&self) -> bool
pub fn ctap_needs_get_response(&self) -> bool
CTAP proprietary: true
if the card expects a NFCCTAP_GETRESPONSE
command to get the actual response (91 00
).
sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
true
if the card returned a success-like response (Self::is_ok()
,
Self::bytes_available()
> 0, or
Self::ctap_needs_get_response()
).
Trait Implementations§
source§impl Clone for ISO7816ResponseAPDU
impl Clone for ISO7816ResponseAPDU
source§fn clone(&self) -> ISO7816ResponseAPDU
fn clone(&self) -> ISO7816ResponseAPDU
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ISO7816ResponseAPDU
impl Debug for ISO7816ResponseAPDU
source§impl PartialEq for ISO7816ResponseAPDU
impl PartialEq for ISO7816ResponseAPDU
source§fn eq(&self, other: &ISO7816ResponseAPDU) -> bool
fn eq(&self, other: &ISO7816ResponseAPDU) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<&[u8]> for ISO7816ResponseAPDU
impl TryFrom<&[u8]> for ISO7816ResponseAPDU
impl Eq for ISO7816ResponseAPDU
impl StructuralPartialEq for ISO7816ResponseAPDU
Auto Trait Implementations§
impl Freeze for ISO7816ResponseAPDU
impl RefUnwindSafe for ISO7816ResponseAPDU
impl Send for ISO7816ResponseAPDU
impl Sync for ISO7816ResponseAPDU
impl Unpin for ISO7816ResponseAPDU
impl UnwindSafe for ISO7816ResponseAPDU
Blanket Implementations§
source§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
source§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
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