[][src]Enum yubihsm::response::Code

pub enum Code {
    Success(Code),
    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(Code)

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 Code[src]

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

Convert an unsigned byte into a Code (if valid)

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

Convert a Code 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 PartialEq<Code> for Code[src]

impl Clone for Code[src]

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

Performs copy-assignment from source. Read more

impl Eq for Code[src]

impl Copy for Code[src]

impl Debug for Code[src]

impl Serialize for Code[src]

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

Auto Trait Implementations

impl Send for Code

impl Sync for Code

Blanket Implementations

impl<T> From for T[src]

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, 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> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut 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> Same for T

type Output = T

Should always be Self

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