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

impl Copy for Code[src]

impl Debug for Code[src]

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

impl Eq for Code[src]

impl PartialEq<Code> for Code[src]

impl Serialize for Code[src]

impl StructuralEq for Code[src]

impl StructuralPartialEq for Code[src]

Auto Trait Implementations

impl RefUnwindSafe for Code

impl Send for Code

impl Sync for Code

impl Unpin for Code

impl UnwindSafe for Code

Blanket Implementations

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

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

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

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

impl<T> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.