pub enum SimpleSecretsError {
TextDecodingError {
role: &'static str,
cause: DecodeError,
},
CorruptPacket(CorruptPacketKind),
DeserializingError(Error),
InvalidKeyLength(usize),
RandomSourceUnavailable(Error),
SerializingError(Error),
UnknownKey {
expected_id: String,
actual_id: String,
},
}
All the ways the secrets may not work.
There was a problem decoding text data into bytes.
Examples include the hex master key or the websafe packet values.
Fields of TextDecodingError
The purpose of the item we were decoding
The data is has been corrupted to the point where it is unrecoverable.
The kind contains more detail.
The data was verified and decrypted, but could not be deserialized into a Rust data type.
Contains the underlying error.
The master key data must contain exactly 32 bytes, but it did not.
Contains the actual number of bytes found.
RandomSourceUnavailable(Error)
The system's source of secure randomness is not available for use.
Contains the underlying error.
The Rust data type could not be prepared for encryption by serializing it into bytes.
Contains the underlying error.
The packet was encrypted with a another key.
Fields of UnknownKey
The key id mentioned in the packet header. 6 bytes (12 hex chars).
The key id provided by the application. 6 bytes (12 hex chars).
fn from(_err: SymmetricCipherError) -> Self | [src] |
Occurs only when the encrypted data has been damaged. This should probably not be seen in
practice since both the key and the data integrity are checked before decryption.
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
Returns a reference to the Backtrace
carried by this failure, if it carries one. Read more
fn context<D>(self, context: D) -> Context<D> where D: Display + Send + Sync + 'static, | [src] |
Wraps this failure in a compatibility wrapper that implements std::error::Error
. Read more
Converts the given value to a String
. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Converts a reference to Self
into a dynamic trait object of Fail
.
Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
Returns a reference to the Backtrace
carried by this failure, if it carries one. Read more
fn context<D>(self, context: D) -> Context<D> where D: Display + Send + Sync + 'static, | [src] |
Wraps this failure in a compatibility wrapper that implements std::error::Error
. Read more