Enum redact_crypto::CryptoError[][src]

pub enum CryptoError {
    InternalError {
        source: Box<dyn Error + Send + Sync>,
    },
    FsIoError {
        source: Error,
    },
    FileNotFound {
        path: String,
    },
    NotFound,
    CiphertextFailedVerification,
    InvalidKeyLength {
        expected: usize,
        actual: usize,
    },
    NotDowncastable,
    FilePathHasNoFileStem {
        path: String,
    },
    FilePathIsInvalidUTF8,
    NotDeserializableToBaseDataType,
    Base64Decode {
        source: DecodeError,
    },
    WrongNonceType,
}
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

Show 1 field

Fields of InternalError

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

Error occurred while performing IO on the filesystem

Show 1 field

Fields of FsIoError

source: Error
FileNotFound

File path given was not found

Show 1 field

Fields of FileNotFound

path: String
NotFound

The requested resource was not found

CiphertextFailedVerification

Ciphertext failed veri fication before decryption

InvalidKeyLength

Provided bytes are not the right length for the

Show 2 fields

Fields of InvalidKeyLength

expected: usizeactual: usize
NotDowncastable

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

FilePathHasNoFileStem

File path given has an invalid file name with no stem

Show 1 field

Fields of FilePathHasNoFileStem

path: String
FilePathIsInvalidUTF8

File path given was invalid UTF-8

NotDeserializableToBaseDataType

Given bytes could not be serialized to a base data type

Base64Decode

Error happened when decoding base64 string

Show 1 field

Fields of Base64Decode

source: DecodeError
WrongNonceType

Wrong nonce was provided during seal/unseal operation

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

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.

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

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.