Enum nitrokey::CommandError
source · pub enum CommandError {
Show 14 variants
WrongCrc,
WrongSlot,
SlotNotProgrammed,
WrongPassword,
NotAuthorized,
Timestamp,
NoName,
NotSupported,
UnknownCommand,
AesDecryptionFailed,
Unknown,
InvalidString,
InvalidSlot,
RngError,
}
Expand description
Error types returned by Nitrokey device or by the library.
Variants
WrongCrc
A packet with a wrong checksum has been sent or received.
WrongSlot
A command tried to access an OTP slot that does not exist.
SlotNotProgrammed
A command tried to generate an OTP on a slot that is not configured.
WrongPassword
The provided password is wrong.
NotAuthorized
You are not authorized for this command or provided a wrong temporary password.
Timestamp
An error occured when getting or setting the time.
NoName
You did not provide a name for the OTP slot.
NotSupported
This command is not supported by this device.
UnknownCommand
This command is unknown.
AesDecryptionFailed
AES decryption failed.
Unknown
An unknown error occured.
InvalidString
You passed a string containing a null byte.
InvalidSlot
You passed an invalid slot.
RngError
An error occured during random number generation.
Trait Implementations
sourceimpl Debug for CommandError
impl Debug for CommandError
sourceimpl Display for CommandError
impl Display for CommandError
sourceimpl From<i32> for CommandError
impl From<i32> for CommandError
sourceimpl PartialEq<CommandError> for CommandError
impl PartialEq<CommandError> for CommandError
sourcefn eq(&self, other: &CommandError) -> bool
fn eq(&self, other: &CommandError) -> bool
impl StructuralPartialEq for CommandError
Auto Trait Implementations
impl RefUnwindSafe for CommandError
impl Send for CommandError
impl Sync for CommandError
impl Unpin for CommandError
impl UnwindSafe for CommandError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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