StatusCode

Enum StatusCode 

Source
#[repr(u8)]
pub enum StatusCode {
Show 49 variants Success = 0, InvalidCommand = 1, InvalidParameter = 2, InvalidLength = 3, InvalidSeq = 4, Timeout = 5, ChannelBusy = 6, LockRequired = 10, InvalidChannel = 11, CborUnexpectedType = 17, InvalidCbor = 18, MissingParameter = 20, LimitExceeded = 21, UnsupportedExtension = 22, CredentialExcluded = 25, Processing = 33, InvalidCredential = 34, UserActionPending = 35, OperationPending = 36, NoOperations = 37, UnsupportedAlgorithm = 38, OperationDenied = 39, KeyStoreFull = 40, NotBusy = 41, NoOperationPending = 42, UnsupportedOption = 43, InvalidOption = 44, KeepaliveCancel = 45, NoCredentials = 46, UserActionTimeout = 47, NotAllowed = 48, PinInvalid = 49, PinBlocked = 50, PinAuthInvalid = 51, PinAuthBlocked = 52, PinNotSet = 53, PinRequired = 54, PinPolicyViolation = 55, PinTokenExpired = 56, RequestTooLarge = 57, ActionTimeout = 58, UpRequired = 59, UvBlocked = 60, IntegrityFailure = 61, InvalidSubcommand = 62, UvInvalid = 63, UnauthorizedPermission = 64, PuatRequired = 65, Other = 127,
}
Expand description

CTAP2 status codes

These status codes are returned in CTAP responses to indicate success or various error conditions.

Variants§

§

Success = 0

Successful completion of command

§

InvalidCommand = 1

Invalid command

§

InvalidParameter = 2

Invalid parameter in request

§

InvalidLength = 3

Invalid message or item length

§

InvalidSeq = 4

Invalid message sequencing

§

Timeout = 5

Message timed out

§

ChannelBusy = 6

Channel busy

§

LockRequired = 10

Command requires channel lock

§

InvalidChannel = 11

Invalid channel

§

CborUnexpectedType = 17

CBOR unexpected type

§

InvalidCbor = 18

Invalid CBOR encoding

§

MissingParameter = 20

Missing required parameter

§

LimitExceeded = 21

Limit exceeded

§

UnsupportedExtension = 22

Unsupported extension

§

CredentialExcluded = 25

Credential excluded (already exists)

§

Processing = 33

Processing (e.g. waiting for user presence)

§

InvalidCredential = 34

Invalid credential

§

UserActionPending = 35

User action pending

§

OperationPending = 36

Operation pending

§

NoOperations = 37

No operations pending

§

UnsupportedAlgorithm = 38

Unsupported algorithm

§

OperationDenied = 39

Operation denied by user

§

KeyStoreFull = 40

Key store full

§

NotBusy = 41

Not busy

§

NoOperationPending = 42

No operation pending

§

UnsupportedOption = 43

Unsupported option

§

InvalidOption = 44

Invalid option

§

KeepaliveCancel = 45

Keepalive cancel

§

NoCredentials = 46

No credentials found

§

UserActionTimeout = 47

User action timeout

§

NotAllowed = 48

Not allowed

§

PinInvalid = 49

PIN invalid

§

PinBlocked = 50

PIN blocked

§

PinAuthInvalid = 51

PIN/UV auth parameter invalid

§

PinAuthBlocked = 52

PIN/UV auth blocked

§

PinNotSet = 53

PIN not set

§

PinRequired = 54

PIN required for this operation

§

PinPolicyViolation = 55

PIN policy violation

§

PinTokenExpired = 56

PIN token expired

§

RequestTooLarge = 57

Request too large

§

ActionTimeout = 58

Action timeout

§

UpRequired = 59

User presence required

§

UvBlocked = 60

User verification blocked

§

IntegrityFailure = 61

Integrity failure

§

InvalidSubcommand = 62

Invalid subcommand

§

UvInvalid = 63

User verification invalid

§

UnauthorizedPermission = 64

Unauthorized permission

§

PuatRequired = 65

PIN/UV auth token required

§

Other = 127

Other unspecified error

Implementations§

Source§

impl StatusCode

Source

pub fn to_u8(self) -> u8

Convert status code to byte value

Source

pub fn from_u8(value: u8) -> StatusCode

Create status code from byte value

Source

pub fn is_success(self) -> bool

Check if this is a success status

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<(), Error>

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

impl Display for StatusCode

Source§

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

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

impl Error for StatusCode

Available on crate feature std only.

Implement std::error::Error only when std is available

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<CryptoError> for StatusCode

Source§

fn from(err: CryptoError) -> StatusCode

Converts to this type from the input type.
Source§

impl From<Error> for StatusCode

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<StatusCode> for Error

Source§

fn from(status: StatusCode) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for StatusCode

Source§

fn from(value: u8) -> StatusCode

Converts to this type from the input type.
Source§

impl PartialEq for StatusCode

Source§

fn eq(&self, other: &StatusCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for StatusCode

Source§

impl Eq for StatusCode

Source§

impl StructuralPartialEq 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> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V