Struct ledger_apdu::APDUAnswer
source · pub struct APDUAnswer<B> { /* private fields */ }
Expand description
An APDU answer, whole last 2 bytes are interpreted as retcode
Implementations§
source§impl<B> APDUAnswer<B>
impl<B> APDUAnswer<B>
sourcepub fn from_answer(answer: B) -> Result<Self, APDUAnswerError>
pub fn from_answer(answer: B) -> Result<Self, APDUAnswerError>
Attempt to interpret the given slice as an APDU answer
sourcepub fn error_code(&self) -> Result<APDUErrorCode, u16>
pub fn error_code(&self) -> Result<APDUErrorCode, u16>
Will attempt to interpret the error code as an APDUErrorCode, returning the code as is otherwise
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for APDUAnswer<B>where
B: Freeze,
impl<B> RefUnwindSafe for APDUAnswer<B>where
B: RefUnwindSafe,
impl<B> Send for APDUAnswer<B>where
B: Send,
impl<B> Sync for APDUAnswer<B>where
B: Sync,
impl<B> Unpin for APDUAnswer<B>where
B: Unpin,
impl<B> UnwindSafe for APDUAnswer<B>where
B: 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