Enum redact_crypto::CryptoError[][src]

pub enum CryptoError {
    InternalError {
        source: Box<dyn Error + Send + Sync>,
    },
    NotFound {
        source: Box<dyn Error + Send + Sync>,
    },
    CiphertextFailedVerification,
    InvalidKeyLength {
        expected: usize,
        actual: usize,
    },
    InvalidSeedLength {
        expected: usize,
        actual: usize,
    },
    NotDowncastable,
    NotDeserializableToBaseDataType,
    WrongNonceType,
    BadSignature,
}
Expand description

Error that wraps all possible errors out of the redact-crypto crate

Variants

InternalError

Represents an error which occurred in some internal system

Fields of InternalError

source: Box<dyn Error + Send + Sync>
NotFound

The requested resource was not found

Fields of NotFound

source: Box<dyn Error + Send + Sync>
CiphertextFailedVerification

Ciphertext failed veri fication before decryption

InvalidKeyLength

Provided bytes are not the right length for the key

Fields of InvalidKeyLength

expected: usizeactual: usize
InvalidSeedLength

Provided bytes are not the right length for the seed

Fields of InvalidSeedLength

expected: usizeactual: usize
NotDowncastable

Given value was not of the right type to be downcasted to the requested type

NotDeserializableToBaseDataType

Given bytes could not be serialized to a base data type

WrongNonceType

Wrong nonce was provided during seal/unseal operation

BadSignature

A signature was not verifiable

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

TODO: once 1.33.0 is the minimum supported compiler version, remove Any::type_id_compat and use StdAny::type_id instead. https://github.com/rust-lang/rust/issues/27745 Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more