Enum sshcerts::error::Error[][src]

pub enum Error {
Show 14 variants Io(Error), Decode(DecodeError), Utf8Error(FromUtf8Error), InvalidCertType(u32), InvalidFormat, UnexpectedEof, NotCertificate, KeyTypeMismatch, CertificateInvalidSignature, SigningError, EncryptedPrivateKey, EncryptedPrivateKeyNotSupported, UnknownKeyType(String), UnknownCurve(String),
}
Expand description

A type to represent the different kinds of errors.

Variants

Io(Error)

Tuple Fields

0: Error

There was an error reading from or writing to an external source

Decode(DecodeError)

Tuple Fields

Data was improperly encoded as base64

Utf8Error(FromUtf8Error)

Tuple Fields

Data was not a valid UTF8 string.

InvalidCertType(u32)

Tuple Fields

0: u32

A certificate type that doesn’t exist was requested. Should be either 1 or 2

InvalidFormat

The format of a certificate was incorrect

UnexpectedEof

The stream ended unexpectedly

NotCertificate

The provided data was not a certificate

KeyTypeMismatch

The requested signature or key was incompatible with what was previously specified

CertificateInvalidSignature

The certificate is not signed correctly and invalid

SigningError

A cryptographic operation failed.

EncryptedPrivateKey

An encrypted private key was provided with no decryption key

EncryptedPrivateKeyNotSupported

An encrypted private key was supplied but the encryption method is not supported

UnknownKeyType(String)

Tuple Fields

0: String

The key type is unknown

UnknownCurve(String)

Tuple Fields

0: String

The curve in an ECC public/private key/signature is unknown

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

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

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.