pub enum AgeVaultError {
KeyRead(Error),
KeyParse(String),
VaultRead(Error),
Decrypt(DecryptError),
Io(Error),
Json(Error),
Encrypt(String),
VaultWrite(Error),
KeyWrite(Error),
}Expand description
Errors that can occur during age vault operations.
Each variant wraps the underlying cause so callers can match on failure type without parsing error strings.
§Examples
use zeph_vault::AgeVaultError;
let err = AgeVaultError::KeyParse("no identity line found".into());
assert!(err.to_string().contains("failed to parse age identity"));Variants§
KeyRead(Error)
The key file could not be read from disk.
KeyParse(String)
The key file content could not be parsed as an age identity.
VaultRead(Error)
The vault file could not be read from disk.
Decrypt(DecryptError)
The age decryption step failed (wrong key, corrupted file, etc.).
Io(Error)
An I/O error occurred while reading plaintext from the age stream.
Json(Error)
The decrypted bytes could not be parsed as JSON.
Encrypt(String)
The age encryption step failed.
VaultWrite(Error)
The vault file (or its temporary predecessor) could not be written to disk.
KeyWrite(Error)
The key file could not be written to disk.
Trait Implementations§
Source§impl Debug for AgeVaultError
impl Debug for AgeVaultError
Source§impl Display for AgeVaultError
impl Display for AgeVaultError
Source§impl Error for AgeVaultError
impl Error for AgeVaultError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for AgeVaultError
impl !RefUnwindSafe for AgeVaultError
impl Send for AgeVaultError
impl Sync for AgeVaultError
impl Unpin for AgeVaultError
impl UnsafeUnpin for AgeVaultError
impl !UnwindSafe for AgeVaultError
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