StatusCode

Enum StatusCode 

Source
#[repr(u16)]
pub enum StatusCode {
Show 39 variants AccessConditionNotFulfilled = 38_916, AlgorithmNotSupported = 38_020, ClaNotSupported = 28_160, CodeBlocked = 38_976, CodeNotInitialized = 38_914, CommandIncompatibleFileStructure = 27_009, ConditionsOfUseNotSatisfied = 27_013, ContradictionInvalidation = 38_928, ContradictionSecretCodeStatus = 38_920, CustomImageBootloader = 26_159, CustomImageEmpty = 26_158, FileAlreadyExists = 27_273, FileNotFound = 37_892, GpAuthFailed = 25_344, Halted = 28_586, InconsistentFile = 37_896, IncorrectData = 27_264, IncorrectLength = 26_368, IncorrectP1P2 = 27_392, InsNotSupported = 27_904, DeviceNotOnboarded = 27_911, DeviceNotOnboarded2 = 26_129, InvalidKcv = 38_021, InvalidOffset = 37_890, Licensing = 28_482, LockedDevice = 21_781, MaxValueReached = 38_992, MemoryProblem = 37_440, MissingCriticalParameter = 26_624, NoEfSelected = 37_888, NotEnoughMemorySpace = 27_268, Ok = 36_864, PinRemainingAttempts = 25_536, ReferencedDataNotFound = 27_272, SecurityStatusNotSatisfied = 27_010, TechnicalProblem = 28_416, UnknownApdu = 27_906, UserRefusedOnDevice = 21_761, NotEnoughSpace = 20_738,
}
Expand description

Device status codes (two bytes, trailing response data)

Replicated from: https://github.com/LedgerHQ/ledger-live/blob/develop/libs/ledgerjs/packages/errors/src/index.ts#L212

Variants§

§

AccessConditionNotFulfilled = 38_916

Access condition not fulfilled

§

AlgorithmNotSupported = 38_020

Algorithm not supported

§

ClaNotSupported = 28_160

APDU class not supported

§

CodeBlocked = 38_976

Code blocked

§

CodeNotInitialized = 38_914

Code not initialized

§

CommandIncompatibleFileStructure = 27_009

Command incompatible file structure

§

ConditionsOfUseNotSatisfied = 27_013

Conditions of use not satisfied

§

ContradictionInvalidation = 38_928

Contradiction invalidation

§

ContradictionSecretCodeStatus = 38_920

Contradiction secret code status

§

CustomImageBootloader = 26_159

Custom image bootloader

§

CustomImageEmpty = 26_158

Custom image empty

§

FileAlreadyExists = 27_273

File already exists

§

FileNotFound = 37_892

File not found

§

GpAuthFailed = 25_344

GP auth failed

§

Halted = 28_586

Device halted

§

InconsistentFile = 37_896

Inconsistent file

§

IncorrectData = 27_264

Incorrect data

§

IncorrectLength = 26_368

Incorrect length

§

IncorrectP1P2 = 27_392

Incorrect P1 or P2 values

§

InsNotSupported = 27_904

Instruction not supported

§

DeviceNotOnboarded = 27_911

Device not onboarded

§

DeviceNotOnboarded2 = 26_129

Device also not onboarded

§

InvalidKcv = 38_021

Invalid KCV

§

InvalidOffset = 37_890

Invalid offset

§

Licensing = 28_482

Licensing error

§

LockedDevice = 21_781

Device locked

§

MaxValueReached = 38_992

Max value reached

§

MemoryProblem = 37_440

Memory problem

§

MissingCriticalParameter = 26_624

Missing critical parameter

§

NoEfSelected = 37_888

No EF selected

§

NotEnoughMemorySpace = 27_268

Not enough memory space

§

Ok = 36_864

OK

§

PinRemainingAttempts = 25_536

Remaining PIN attempts

§

ReferencedDataNotFound = 27_272

Referenced data not found

§

SecurityStatusNotSatisfied = 27_010

Security status not satisfied

§

TechnicalProblem = 28_416

Technical problem

§

UnknownApdu = 27_906

Unknown APDU

§

UserRefusedOnDevice = 21_761

User refused on device

§

NotEnoughSpace = 20_738

Not enough space

Trait Implementations§

Source§

impl Clone for StatusCode

Source§

fn clone(&self) -> StatusCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StatusCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for StatusCode

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl TryFrom<u16> for StatusCode

Source§

type Error = TryFromPrimitiveError<StatusCode>

The type returned in the event of a conversion error.
Source§

fn try_from(number: u16) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for StatusCode

Source§

impl Copy for StatusCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.