Enum coins_ledger::common::APDUResponseCodes
source · #[repr(u16)]pub enum APDUResponseCodes {
Show 15 variants
NoError = 36_864,
ExecutionError = 25_600,
WrongLength = 26_368,
UnlockDeviceError = 26_628,
EmptyBuffer = 27_010,
OutputBufferTooSmall = 27_011,
DataInvalid = 27_012,
ConditionsNotSatisfied = 27_013,
CommandNotAllowed = 27_014,
InvalidData = 27_264,
InvalidP1P2 = 27_392,
InsNotSupported = 27_904,
ClaNotSupported = 28_160,
Unknown = 28_416,
SignVerifyError = 28_417,
}
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 = 36_864
No Error
ExecutionError = 25_600
ExecutionError
WrongLength = 26_368
WrongLength
UnlockDeviceError = 26_628
UnlockDeviceError
EmptyBuffer = 27_010
EmptyBuffer
OutputBufferTooSmall = 27_011
OutputBufferTooSmall
DataInvalid = 27_012
DataInvalid
ConditionsNotSatisfied = 27_013
ConditionsNotSatisfied
CommandNotAllowed = 27_014
CommandNotAllowed
InvalidData = 27_264
InvalidData
InvalidP1P2 = 27_392
InvalidP1P2
InsNotSupported = 27_904
InsNotSupported
ClaNotSupported = 28_160
ClaNotSupported
Unknown = 28_416
Unknown
SignVerifyError = 28_417
SignVerifyError
Implementations§
source§impl APDUResponseCodes
impl APDUResponseCodes
sourcepub const fn is_success(self) -> bool
pub const fn is_success(self) -> bool
True if the response is a success, else false.
sourcepub const fn description(self) -> &'static str
pub const 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 for APDUResponseCodes
impl PartialEq 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 ==
.source§impl TryFrom<u16> for APDUResponseCodes
impl TryFrom<u16> for APDUResponseCodes
impl Copy for APDUResponseCodes
impl Eq for APDUResponseCodes
impl StructuralPartialEq for APDUResponseCodes
Auto Trait Implementations§
impl Freeze for APDUResponseCodes
impl RefUnwindSafe for APDUResponseCodes
impl Send for APDUResponseCodes
impl Sync for APDUResponseCodes
impl Unpin for APDUResponseCodes
impl UnwindSafe for APDUResponseCodes
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)