[][src]Enum yubihsm::ResponseCode

pub enum ResponseCode {
    Success(CommandCode),
    MemoryError,
    InitError,
    ConnectionError,
    ConnectorNotFound,
    InvalidParameters,
    WrongLength,
    BufferTooSmall,
    CryptogramMismatch,
    SessionAuthenticationFailed,
    MacMismatch,
    DeviceOK,
    DeviceInvalidCommand,
    DeviceInvalidData,
    DeviceInvalidSession,
    DeviceAuthenticationFailed,
    DeviceSessionsFull,
    DeviceSessionFailed,
    DeviceStorageFailed,
    DeviceWrongLength,
    DeviceInsufficientPermissions,
    DeviceLogFull,
    DeviceObjectNotFound,
    DeviceInvalidId,
    DeviceInvalidOtp,
    DeviceDemoMode,
    DeviceCommandUnexecuted,
    GenericError,
    DeviceObjectExists,
    ConnectorError,
    DeviceSshCaConstraintViolation,
}

Codes associated with HSM responses

Variants

Success(CommandCode)

Successful response for the given command type

MemoryError

HSM memory error (or generic error)

InitError

Initialization error

ConnectionError

Network error

ConnectorNotFound

Couldn't find connector

InvalidParameters

Invalid parameters

WrongLength

Wrong length

BufferTooSmall

Buffer is too small

CryptogramMismatch

Cryptogram mismatches

SessionAuthenticationFailed

Session auth error

MacMismatch

MAC mismatch

DeviceOK

OK (HSM)

DeviceInvalidCommand

Invalid command (HSM)

DeviceInvalidData

Invalid data (HSM)

DeviceInvalidSession

Invalid session (HSM)

DeviceAuthenticationFailed

Authentication failure (HSM)

DeviceSessionsFull

Sessions full (HSM)

DeviceSessionFailed

Session failed (HSM)

DeviceStorageFailed

Storage failed (HSM)

DeviceWrongLength

Wrong length (HSM)

DeviceInsufficientPermissions

Invalid permissions (HSM)

DeviceLogFull

Audit log full (HSM)

DeviceObjectNotFound

Object not found (HSM)

DeviceInvalidId

Invalid ID (HSM)

DeviceInvalidOtp

Invalid OTP (HSM)

DeviceDemoMode

Demo mode (HSM)

DeviceCommandUnexecuted

Command unexecuted

GenericError

Generic error

DeviceObjectExists

Object already exists

ConnectorError

Connector error

DeviceSshCaConstraintViolation

Constraint on CA violated

Methods

impl ResponseCode[src]

pub fn from_u8(byte: u8) -> Result<Self, Error>[src]

Convert an unsigned byte into a ResponseCode (if valid)

pub fn to_u8(self) -> u8[src]

Convert a ResponseCode back into its original byte form

pub fn is_success(self) -> bool[src]

Is this a successful response?

pub fn is_err(self) -> bool[src]

Is this an error response?

Trait Implementations

impl Eq for ResponseCode[src]

impl Clone for ResponseCode[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for ResponseCode[src]

impl PartialEq<ResponseCode> for ResponseCode[src]

impl Debug for ResponseCode[src]

impl Serialize for ResponseCode[src]

impl<'de> Deserialize<'de> for ResponseCode[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Same for T

type Output = T

Should always be Self