[][src]Enum osshkeys::error::ErrorKind

pub enum ErrorKind {
    OpenSslError,
    Ed25519Error,
    IOError,
    FmtError,
    Base64Error,
    InvalidArgument,
    InvalidKeyFormat,
    InvalidFormat,
    InvalidKey,
    InvalidKeySize,
    InvalidLength,
    UnsupportCurve,
    UnsupportCipher,
    IncorrectPass,
    TypeNotMatch,
    UnsupportType,
    InvalidPemFormat,
    InvalidKeyIvLength,
    Unknown,
}

Indicate the reason of the error

Variants

OpenSslError

The error is caused by OpenSSL, to get the underlying error, use failure::Fail::cause()

Ed25519Error

The error is caused by ed25519-dalek, to get the underlying error, use failure::Fail::cause()

IOError

The error is caused by I/O error or reader error

FmtError

Can't format some data

Base64Error

The base64 string is invalid

InvalidArgument

The argument passed into the function is invalid

InvalidKeyFormat

The key file has some invalid data in it

InvalidFormat

Currently not used...

InvalidKey

Some parts of the key are invalid

InvalidKeySize

The key size is invalid

InvalidLength

The slice length is invalid

UnsupportCurve

The elliptic curve is not supported

UnsupportCipher

The encrypt cipher is not supported

IncorrectPass

The passphrase is incorrect, can't decrypt the key

TypeNotMatch

The key type is not the desired one

UnsupportType

The key type is not supported

InvalidPemFormat

The key file's PEM part is invalid

InvalidKeyIvLength

The key or IV length can't meet the cipher's requirement

Unknown

Something shouldn't happen but it DID happen...

Methods

impl ErrorKind[src]

pub fn description(self) -> &'static str[src]

Get the description of the kind

Trait Implementations

impl Clone for ErrorKind[src]

impl Copy for ErrorKind[src]

impl Debug for ErrorKind[src]

impl Display for ErrorKind[src]

impl Eq for ErrorKind[src]

impl From<ErrorKind> for Error[src]

impl PartialEq<ErrorKind> for ErrorKind[src]

impl StructuralEq for ErrorKind[src]

impl StructuralPartialEq for ErrorKind[src]

Auto Trait Implementations

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> 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> ToString for T where
    T: Display + ?Sized
[src]

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,