Enum yubihsm::response::ResponseCode [−][src]
pub enum ResponseCode { Success(CommandType), MemoryError, InitError, NetError, ConnectorNotFound, InvalidParams, WrongLength, BufferTooSmall, CryptogramMismatch, AuthSessionError, MACMismatch, DeviceOK, DeviceInvalidCommand, DeviceInvalidData, DeviceInvalidSession, DeviceAuthFail, DeviceSessionsFull, DeviceSessionFailed, DeviceStorageFailed, DeviceWrongLength, DeviceInvalidPermission, DeviceLogFull, DeviceObjNotFound, DeviceIDIllegal, DeviceInvalidOTP, DeviceDemoMode, DeviceCmdUnexecuted, GenericError, DeviceObjectExists, ConnectorError, }
Codes associated with YubiHSM2
responses
Variants
Success(CommandType)
Successful response for the given command type
MemoryError
HSM memory error (or generic error)
InitError
Initialization error
NetError
Network error
ConnectorNotFound
Couldn't find connector
InvalidParams
Invalid parameters
WrongLength
Wrong length
BufferTooSmall
Buffer is too small
CryptogramMismatch
Cryptogram mismatches
AuthSessionError
Session auth error
MACMismatch
MAC mismatch
DeviceOK
OK (HSM)
DeviceInvalidCommand
Invalid command (HSM)
DeviceInvalidData
Invalid data (HSM)
DeviceInvalidSession
Invalid session (HSM)
DeviceAuthFail
Authentication failure (HSM)
DeviceSessionsFull
Sessions full (HSM)
DeviceSessionFailed
Session failed (HSM)
DeviceStorageFailed
Storage failed (HSM)
DeviceWrongLength
Wrong length (HSM)
DeviceInvalidPermission
Invalid permissions (HSM)
DeviceLogFull
Audit log full (HSM)
DeviceObjNotFound
Object not found (HSM)
DeviceIDIllegal
ID illegal (HSM)
DeviceInvalidOTP
Invalid OTP (HSM)
DeviceDemoMode
Demo mode (HSM)
DeviceCmdUnexecuted
Command unexecuted
GenericError
Generic error
DeviceObjectExists
Object already exists
ConnectorError
Connector error
Methods
impl ResponseCode
[src]
impl ResponseCode
pub fn from_u8(byte: u8) -> Result<Self, Error>
[src]
pub fn from_u8(byte: u8) -> Result<Self, Error>
Convert an unsigned byte into a ResponseCode (if valid)
pub fn to_u8(self) -> u8
[src]
pub fn to_u8(self) -> u8
Convert a ResponseCode back into its original byte form
pub fn is_success(self) -> bool
[src]
pub fn is_success(self) -> bool
Is this a successful response?
pub fn is_err(self) -> bool
[src]
pub fn is_err(self) -> bool
Is this an error response?
Trait Implementations
impl Copy for ResponseCode
[src]
impl Copy for ResponseCode
impl Clone for ResponseCode
[src]
impl Clone for ResponseCode
fn clone(&self) -> ResponseCode
[src]
fn clone(&self) -> ResponseCode
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for ResponseCode
[src]
impl Debug for ResponseCode
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for ResponseCode
[src]
impl Eq for ResponseCode
impl PartialEq for ResponseCode
[src]
impl PartialEq for ResponseCode
fn eq(&self, other: &ResponseCode) -> bool
[src]
fn eq(&self, other: &ResponseCode) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ResponseCode) -> bool
[src]
fn ne(&self, other: &ResponseCode) -> bool
This method tests for !=
.
impl Serialize for ResponseCode
[src]
impl Serialize for ResponseCode
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for ResponseCode
[src]
impl<'de> Deserialize<'de> for ResponseCode
fn deserialize<D>(deserializer: D) -> Result<ResponseCode, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<ResponseCode, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl Send for ResponseCode
impl Send for ResponseCode
impl Sync for ResponseCode
impl Sync for ResponseCode