Enum sequoia_openpgp::Error[][src]

#[non_exhaustive]
pub enum Error {
Show 27 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), UnsupportedCert(String), IndexOutOfRange, Expired(SystemTime), NotYetLive(SystemTime), NoBindingSignature(SystemTime), InvalidKey(String), 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.

Tuple Fields of InvalidArgument

0: String
InvalidOperation(String)

Invalid operation.

Tuple Fields of InvalidOperation

0: String
MalformedPacket(String)

A malformed packet.

Tuple Fields of MalformedPacket

0: String
PacketTooLarge(Tagu32u32)

Packet size exceeds the configured limit.

Tuple Fields of PacketTooLarge

0: Tag1: u322: u32
UnsupportedPacketType(Tag)

Unsupported packet type.

Tuple Fields of UnsupportedPacketType

0: Tag
UnsupportedHashAlgorithm(HashAlgorithm)

Unsupported hash algorithm identifier.

Tuple Fields of UnsupportedHashAlgorithm

0: HashAlgorithm
UnsupportedPublicKeyAlgorithm(PublicKeyAlgorithm)

Unsupported public key algorithm identifier.

Tuple Fields of UnsupportedPublicKeyAlgorithm

0: PublicKeyAlgorithm
UnsupportedEllipticCurve(Curve)

Unsupported elliptic curve ASN.1 OID.

Tuple Fields of UnsupportedEllipticCurve

0: Curve
UnsupportedSymmetricAlgorithm(SymmetricAlgorithm)

Unsupported symmetric key algorithm.

Tuple Fields of UnsupportedSymmetricAlgorithm

0: SymmetricAlgorithm
UnsupportedAEADAlgorithm(AEADAlgorithm)

Unsupported AEAD algorithm.

Tuple Fields of UnsupportedAEADAlgorithm

0: AEADAlgorithm
UnsupportedCompressionAlgorithm(CompressionAlgorithm)

Unsupported Compression algorithm.

Tuple Fields of UnsupportedCompressionAlgorithm

0: CompressionAlgorithm
UnsupportedSignatureType(SignatureType)

Unsupported signature type.

Tuple Fields of UnsupportedSignatureType

0: SignatureType
InvalidPassword

Invalid password.

InvalidSessionKey(String)

Invalid session key.

Tuple Fields of InvalidSessionKey

0: String
MissingSessionKey(String)

Missing session key.

Tuple Fields of MissingSessionKey

0: String
MalformedMPI(String)

Malformed MPI.

Tuple Fields of MalformedMPI

0: String
BadSignature(String)

Bad signature.

Tuple Fields of BadSignature

0: String
ManipulatedMessage

Message has been manipulated.

MalformedMessage(String)

Malformed message.

Tuple Fields of MalformedMessage

0: String
MalformedCert(String)

Malformed certificate.

Tuple Fields of MalformedCert

0: String
UnsupportedCert(String)

Unsupported Cert.

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

Tuple Fields of UnsupportedCert

0: String
IndexOutOfRange

Index out of range.

Expired(SystemTime)

Expired.

Tuple Fields of Expired

0: SystemTime
NotYetLive(SystemTime)

Not yet live.

Tuple Fields of NotYetLive

0: SystemTime
NoBindingSignature(SystemTime)

No binding signature.

Tuple Fields of NoBindingSignature

0: SystemTime
InvalidKey(String)

Invalid key.

Tuple Fields of InvalidKey

0: String
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.

Tuple Fields of PolicyViolation

0: String1: Option<SystemTime>

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

Performs the conversion.

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

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

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

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

recently added

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.