#[non_exhaustive]#[repr(u8)]pub enum StatusCode {
Show 47 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,
PuatRequired = 54,
PinPolicyViolation = 55,
RequestTooLarge = 57,
ActionTimeout = 58,
UpRequired = 59,
UvBlocked = 60,
IntegrityFailure = 61,
InvalidSubcommand = 62,
UvInvalid = 63,
UnauthorizedPermission = 64,
Other = 127,
}Expand description
CTAP2 status codes
These status codes are returned in CTAP responses to indicate success or various error conditions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
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
PuatRequired = 54
PIN/UV auth token required
PinPolicyViolation = 55
PIN policy violation
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
Unauthorized permission
Other = 127
Other unspecified error
Implementations§
Source§impl StatusCode
impl StatusCode
Sourcepub const PinRequired: StatusCode = Self::PuatRequired
👎Deprecated: use StatusCode::PuatRequired
pub const PinRequired: StatusCode = Self::PuatRequired
use StatusCode::PuatRequired
Deprecated CTAP 2.0 source-level alias. Serializes as CTAP2_ERR_PUAT_REQUIRED (0x36) under the modern registry.
Sourcepub const PinTokenExpired: StatusCode = Self::PinAuthInvalid
👎Deprecated: use StatusCode::PinAuthInvalid
pub const PinTokenExpired: StatusCode = Self::PinAuthInvalid
use StatusCode::PinAuthInvalid
Deprecated CTAP 2.0 source-level alias. The 0x38 wire value is reserved in modern CTAP, so expired tokens map to PIN_AUTH_INVALID.
Sourcepub fn from_u8(value: u8) -> StatusCode
pub fn from_u8(value: u8) -> StatusCode
Create status code from byte value
Sourcepub fn is_success(self) -> bool
pub fn is_success(self) -> bool
Check if this is a success status
Trait Implementations§
Source§impl Clone for StatusCode
impl Clone for StatusCode
Source§fn clone(&self) -> StatusCode
fn clone(&self) -> StatusCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for StatusCode
Source§impl Debug for StatusCode
impl Debug for StatusCode
Source§impl Display for StatusCode
impl Display for StatusCode
impl Eq for StatusCode
Source§impl Error for StatusCode
Available on crate feature std only.Implement std::error::Error only when std is available
impl Error for StatusCode
std only.Implement std::error::Error only when std is available
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<CredentialKeyError> for StatusCode
impl From<CredentialKeyError> for StatusCode
Source§fn from(err: CredentialKeyError) -> StatusCode
fn from(err: CredentialKeyError) -> StatusCode
Source§impl From<CryptoError> for StatusCode
impl From<CryptoError> for StatusCode
Source§fn from(err: CryptoError) -> StatusCode
fn from(err: CryptoError) -> StatusCode
Source§impl From<Error> for StatusCode
impl From<Error> for StatusCode
Source§impl From<StatusCode> for Error
impl From<StatusCode> for Error
Source§fn from(status: StatusCode) -> Self
fn from(status: StatusCode) -> Self
Source§impl From<u8> for StatusCode
impl From<u8> for StatusCode
Source§fn from(value: u8) -> StatusCode
fn from(value: u8) -> StatusCode
Source§impl FromStr for StatusCode
impl FromStr for StatusCode
Source§type Err = ParseStatusCodeError
type Err = ParseStatusCodeError
Source§fn from_str(s: &str) -> Result<StatusCode, <StatusCode as FromStr>::Err>
fn from_str(s: &str) -> Result<StatusCode, <StatusCode as FromStr>::Err>
s to return a value of this type. Read more