#[non_exhaustive]pub enum Error {
Show 19 variants
AlgorithmUnknown,
AlgorithmUnsupported {
algorithm: Algorithm,
},
CertificateFieldInvalid(Field),
CertificateValidation,
Crypto,
Decrypted,
Ecdsa(Error),
Encoding(Error),
Encrypted,
FormatEncoding,
HashSize,
Io(ErrorKind),
Namespace,
PublicKey,
Ppk(PpkParseError),
RngFailure,
Time,
TrailingData {
remaining: usize,
},
Version {
number: u32,
},
}Expand description
Error type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AlgorithmUnknown
Unknown algorithm.
This is returned when an algorithm is completely unknown to this crate.
AlgorithmUnsupported
Unsupported algorithm.
This is typically returned when an algorithm is recognized, but the relevant crate features to support it haven’t been enabled.
It may also be returned in the event an algorithm is inappropriate for a given usage pattern or context.
CertificateFieldInvalid(Field)
alloc only.Certificate field is invalid or already set.
CertificateValidation
Certificate validation failed.
Crypto
Cryptographic errors.
Decrypted
Cannot perform operation on decrypted private key.
Ecdsa(Error)
ecdsa only.ECDSA key encoding errors.
Encoding(Error)
Encoding errors.
Encrypted
Cannot perform operation on encrypted private key.
FormatEncoding
Other format encoding errors.
HashSize
Provided hash is the wrong size for a given HashAlg.
Io(ErrorKind)
std only.Input/output errors.
Namespace
Namespace invalid.
PublicKey
Public key is incorrect.
Ppk(PpkParseError)
ppk only.PuTTY format parsing errors.
RngFailure
rand_core only.Random number generator errors.
Time
Invalid timestamp (e.g. in a certificate)
TrailingData
Unexpected trailing data at end of message.
Version
Unsupported version.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<DecodeError> for Error
Available on crate features dsa or rsa only.
impl From<DecodeError> for Error
dsa or rsa only.Source§fn from(err: DecodeError) -> Error
fn from(err: DecodeError) -> Error
Source§impl From<FromUtf8Error> for Error
Available on crate feature alloc only.
impl From<FromUtf8Error> for Error
alloc only.Source§fn from(err: FromUtf8Error) -> Error
fn from(err: FromUtf8Error) -> Error
Source§impl From<LabelError> for Error
impl From<LabelError> for Error
Source§fn from(err: LabelError) -> Error
fn from(err: LabelError) -> Error
Source§impl From<SystemTimeError> for Error
Available on crate feature std only.
impl From<SystemTimeError> for Error
std only.