logo
#[non_exhaustive]
pub enum Error {
Show 29 variants InvalidArgument(String), InvalidOperation(String), MalformedPacket(String), PacketTooLarge(Tagu32u32), UnsupportedPacketType(Tag), UnsupportedHashAlgorithm(HashAlgorithm), UnsupportedPublicKeyAlgorithm(PublicKeyAlgorithm), UnsupportedEllipticCurve(Curve), UnsupportedSymmetricAlgorithm(SymmetricAlgorithm), UnsupportedAEADAlgorithm(AEADAlgorithm), UnsupportedCompressionAlgorithm(CompressionAlgorithm), UnsupportedSignatureType(SignatureType), InvalidPassword, InvalidSessionKey(String), MissingSessionKey(String), MalformedMPI(String), BadSignature(String), ManipulatedMessage, MalformedMessage(String), MalformedCert(String), UnsupportedCert2(StringVec<Packet>), UnsupportedCert(String), IndexOutOfRange, Expired(SystemTime), NotYetLive(SystemTime), NoBindingSignature(SystemTime), InvalidKey(String), NoAcceptableHash, PolicyViolation(StringOption<SystemTime>),
}
Expand description

Errors used in this crate.

Note: This enum cannot be exhaustively matched to allow future extensions.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

InvalidArgument(String)

Invalid argument.

InvalidOperation(String)

Invalid operation.

MalformedPacket(String)

A malformed packet.

PacketTooLarge(Tagu32u32)

Packet size exceeds the configured limit.

UnsupportedPacketType(Tag)

Unsupported packet type.

UnsupportedHashAlgorithm(HashAlgorithm)

Unsupported hash algorithm identifier.

UnsupportedPublicKeyAlgorithm(PublicKeyAlgorithm)

Unsupported public key algorithm identifier.

UnsupportedEllipticCurve(Curve)

Unsupported elliptic curve ASN.1 OID.

UnsupportedSymmetricAlgorithm(SymmetricAlgorithm)

Unsupported symmetric key algorithm.

UnsupportedAEADAlgorithm(AEADAlgorithm)

Unsupported AEAD algorithm.

UnsupportedCompressionAlgorithm(CompressionAlgorithm)

Unsupported Compression algorithm.

UnsupportedSignatureType(SignatureType)

Unsupported signature type.

InvalidPassword

Invalid password.

InvalidSessionKey(String)

Invalid session key.

MissingSessionKey(String)

Missing session key.

MalformedMPI(String)

Malformed MPI.

BadSignature(String)

Bad signature.

ManipulatedMessage

Message has been manipulated.

MalformedMessage(String)

Malformed message.

MalformedCert(String)

Malformed certificate.

UnsupportedCert2(StringVec<Packet>)

Unsupported Cert.

This usually occurs, because the primary key is in an unsupported format. In particular, Sequoia does not support version 3 keys.

UnsupportedCert(String)

👎 Deprecated since 1.10.0:

Use UnsupportedCert2 instead.

Unsupported Cert, deprecated version.

IndexOutOfRange

Index out of range.

Expired(SystemTime)

Expired.

NotYetLive(SystemTime)

Not yet live.

NoBindingSignature(SystemTime)

No binding signature.

InvalidKey(String)

Invalid key.

NoAcceptableHash

No hash algorithm found that would be accepted by all signers.

PolicyViolation(StringOption<SystemTime>)

The operation is not allowed, because it violates the policy.

The optional time is the time at which the operation was determined to no longer be secure.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.