pub enum DecryptError {
DecryptionFailed,
ExcessiveWork {
required: u8,
target: u8,
},
InvalidHeader,
InvalidMac,
Io(Error),
KeyDecryptionFailed,
NoMatchingKeys,
UnknownFormat,
}Expand description
The various errors that can be returned during the decryption process.
Variants§
DecryptionFailed
The age file failed to decrypt.
ExcessiveWork
The age file used an excessive work factor for passphrase encryption.
Fields
InvalidHeader
The age header was invalid.
InvalidMac
The MAC in the age header was invalid.
Io(Error)
An I/O error occurred during decryption.
KeyDecryptionFailed
Failed to decrypt an encrypted key.
NoMatchingKeys
None of the provided keys could be used to decrypt the age file.
UnknownFormat
An unknown age format, probably from a newer version.
Trait Implementations§
Source§impl Clone for DecryptError
impl Clone for DecryptError
Source§fn clone(&self) -> DecryptError
fn clone(&self) -> DecryptError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecryptError
impl Debug for DecryptError
Source§impl Display for DecryptError
impl Display for DecryptError
Source§impl Error for DecryptError
impl Error for DecryptError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for DecryptError
impl From<Error> for DecryptError
Source§fn from(_: Error) -> DecryptError
fn from(_: Error) -> DecryptError
Converts to this type from the input type.
Source§impl From<Error> for DecryptError
impl From<Error> for DecryptError
Source§fn from(e: Error) -> DecryptError
fn from(e: Error) -> DecryptError
Converts to this type from the input type.
Source§impl From<MacError> for DecryptError
impl From<MacError> for DecryptError
Source§fn from(_: MacError) -> DecryptError
fn from(_: MacError) -> DecryptError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DecryptError
impl !RefUnwindSafe for DecryptError
impl Send for DecryptError
impl Sync for DecryptError
impl Unpin for DecryptError
impl !UnwindSafe for DecryptError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more