#[non_exhaustive]pub enum KeyValidity {
Unknown,
Undefined,
Never,
Marginal,
Full,
Ultimate,
Expired,
Revoked,
}Expand description
GPG key validity level.
Represents how confident GPG is that the key belongs to the claimed identity. This is derived from signature verification and the web of trust, not to be confused with owner trust (how much we trust the key owner to sign other keys).
Values correspond to GPG’s validity field in --with-colons output.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unknown
Validity unknown (new key or insufficient data)
Undefined
Validity undefined (not yet computed)
Never
Key is explicitly distrusted
Marginal
Marginally valid (some trust path exists)
Full
Fully valid (strong trust path)
Ultimate
Ultimately valid (user’s own key or explicitly trusted)
Expired
Key has expired
Revoked
Key has been revoked
Implementations§
Source§impl KeyValidity
impl KeyValidity
pub fn from_gpg_char(c: char) -> Self
Trait Implementations§
Source§impl Clone for KeyValidity
impl Clone for KeyValidity
Source§fn clone(&self) -> KeyValidity
fn clone(&self) -> KeyValidity
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 KeyValidity
impl Debug for KeyValidity
Source§impl Default for KeyValidity
impl Default for KeyValidity
Source§fn default() -> KeyValidity
fn default() -> KeyValidity
Returns the “default value” for a type. Read more
Source§impl Hash for KeyValidity
impl Hash for KeyValidity
Source§impl Ord for KeyValidity
impl Ord for KeyValidity
Source§fn cmp(&self, other: &KeyValidity) -> Ordering
fn cmp(&self, other: &KeyValidity) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for KeyValidity
impl PartialEq for KeyValidity
Source§impl PartialOrd for KeyValidity
impl PartialOrd for KeyValidity
impl Copy for KeyValidity
impl Eq for KeyValidity
impl StructuralPartialEq for KeyValidity
Auto Trait Implementations§
impl Freeze for KeyValidity
impl RefUnwindSafe for KeyValidity
impl Send for KeyValidity
impl Sync for KeyValidity
impl Unpin for KeyValidity
impl UnwindSafe for KeyValidity
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