Enum ctaphid_types::DeviceError
source · [−]pub enum DeviceError {
InvalidCommand,
InvalidParameter,
InvalidLength,
InvalidSequence,
MessageTimeout,
ChannelBusy,
LockRequired,
InvalidChannel,
Other,
Unknown(u8),
}
Expand description
Error code returned by the device for a failed CTAPHID transaction.
Variants
InvalidCommand
The command in the request is invalid.
InvalidParameter
The parameter(s) in the request is invalid.
InvalidLength
The length field (BCNT) is invalid for the request.
InvalidSequence
The sequence does not match expected value.
MessageTimeout
The message has timed out.
ChannelBusy
The device is busy for the requesting channel.
LockRequired
Command requires channel lock.
InvalidChannel
CID is not valid.
Other
Unspecified error.
Unknown(u8)
Unknown error code.
Trait Implementations
sourceimpl Clone for DeviceError
impl Clone for DeviceError
sourcefn clone(&self) -> DeviceError
fn clone(&self) -> DeviceError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DeviceError
impl Debug for DeviceError
sourceimpl Display for DeviceError
impl Display for DeviceError
sourceimpl Error for DeviceError
impl Error for DeviceError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<u8> for DeviceError
impl From<u8> for DeviceError
sourceimpl Ord for DeviceError
impl Ord for DeviceError
sourcefn cmp(&self, other: &DeviceError) -> Ordering
fn cmp(&self, other: &DeviceError) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<DeviceError> for DeviceError
impl PartialEq<DeviceError> for DeviceError
sourcefn eq(&self, other: &DeviceError) -> bool
fn eq(&self, other: &DeviceError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DeviceError) -> bool
fn ne(&self, other: &DeviceError) -> bool
This method tests for !=
.
sourceimpl PartialOrd<DeviceError> for DeviceError
impl PartialOrd<DeviceError> for DeviceError
sourcefn partial_cmp(&self, other: &DeviceError) -> Option<Ordering>
fn partial_cmp(&self, other: &DeviceError) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for DeviceError
impl Eq for DeviceError
impl StructuralEq for DeviceError
impl StructuralPartialEq for DeviceError
Auto Trait Implementations
impl RefUnwindSafe for DeviceError
impl Send for DeviceError
impl Sync for DeviceError
impl Unpin for DeviceError
impl UnwindSafe for DeviceError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more