Enum coins_ledger::common::APDUResponseCodes
source · #[repr(u16)]
pub enum APDUResponseCodes {
Show 15 variants
NoError,
ExecutionError,
WrongLength,
UnlockDeviceError,
EmptyBuffer,
OutputBufferTooSmall,
DataInvalid,
ConditionsNotSatisfied,
CommandNotAllowed,
BadKeyHandle,
InvalidP1P2,
InsNotSupported,
ClaNotSupported,
Unknown,
SignVerifyError,
}
Expand description
APDU Response codes. These are the last 2 bytes of the APDU packet. Please see APDU and Ledger documentation for each error type.
Variants§
NoError
No Error
ExecutionError
ExecutionError
WrongLength
WrongLength
UnlockDeviceError
UnlockDeviceError
EmptyBuffer
EmptyBuffer
OutputBufferTooSmall
OutputBufferTooSmall
DataInvalid
DataInvalid
ConditionsNotSatisfied
ConditionsNotSatisfied
CommandNotAllowed
CommandNotAllowed
BadKeyHandle
BadKeyHandle
InvalidP1P2
InvalidP1P2
InsNotSupported
InsNotSupported
ClaNotSupported
ClaNotSupported
Unknown
Unknown
SignVerifyError
SignVerifyError
Implementations§
source§impl APDUResponseCodes
impl APDUResponseCodes
sourcepub fn is_success(self) -> bool
pub fn is_success(self) -> bool
True if the response is a success, else false.
sourcepub fn description(self) -> &'static str
pub fn description(self) -> &'static str
Return a description of the response code.
Trait Implementations§
source§impl Clone for APDUResponseCodes
impl Clone for APDUResponseCodes
source§fn clone(&self) -> APDUResponseCodes
fn clone(&self) -> APDUResponseCodes
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 APDUResponseCodes
impl Debug for APDUResponseCodes
source§impl Display for APDUResponseCodes
impl Display for APDUResponseCodes
source§impl From<APDUResponseCodes> for LedgerError
impl From<APDUResponseCodes> for LedgerError
source§fn from(r: APDUResponseCodes) -> Self
fn from(r: APDUResponseCodes) -> Self
Converts to this type from the input type.
source§impl PartialEq<APDUResponseCodes> for APDUResponseCodes
impl PartialEq<APDUResponseCodes> for APDUResponseCodes
source§fn eq(&self, other: &APDUResponseCodes) -> bool
fn eq(&self, other: &APDUResponseCodes) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.