pub enum UserKeyError {
WrongKey,
Malformed(String),
NotAUserKey,
NotThisAccountsKey,
BadRecipient(String),
BadRecoveryCode,
QuantumSafeNeedsTheCli,
Age(String),
}Expand description
Why a user key could not be wrapped or opened. Every refusal has a name.
Variants§
WrongKey
The method’s key is not the one this wrap is for: the wrong SSH key, another security key, a mistyped recovery code.
Malformed(String)
Not a readable age file.
NotAUserKey
It opened, but what is inside is not a user key.
NotThisAccountsKey
It opened to a user key, but not the one the account publishes: a
wrap substituted ALONE is refused. A server that replaces both the
public half and the wrap is caught only where the public half is
pinned: the CLI’s pin (gunnar-cli crypt_key::pins, RA4-1).
BadRecipient(String)
A recipient string that is not one.
BadRecoveryCode
A recovery code that is not one (wrong length or characters).
QuantumSafeNeedsTheCli
A quantum-safe user key needs the CLI (the console has no hybrid KEM).
Age(String)
age itself failed.
Trait Implementations§
Source§impl Clone for UserKeyError
impl Clone for UserKeyError
Source§impl Debug for UserKeyError
impl Debug for UserKeyError
Source§impl Display for UserKeyError
impl Display for UserKeyError
impl Eq for UserKeyError
Source§impl Error for UserKeyError
impl Error for UserKeyError
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()
Source§impl PartialEq for UserKeyError
impl PartialEq for UserKeyError
impl StructuralPartialEq for UserKeyError
Auto Trait Implementations§
impl Freeze for UserKeyError
impl RefUnwindSafe for UserKeyError
impl Send for UserKeyError
impl Sync for UserKeyError
impl Unpin for UserKeyError
impl UnsafeUnpin for UserKeyError
impl UnwindSafe for UserKeyError
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