#[non_exhaustive]pub enum AssuranceLevel {
SelfAsserted,
TokenVerified,
Authenticated,
Sovereign,
}Expand description
Cryptographic assurance level of a platform identity claim.
Variants are ordered from weakest to strongest so that Ord comparisons
reflect trust strength: SelfAsserted < TokenVerified < Authenticated < Sovereign.
Usage:
assert!(AssuranceLevel::Sovereign > AssuranceLevel::Authenticated);
assert!(AssuranceLevel::SelfAsserted < AssuranceLevel::TokenVerified);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.
SelfAsserted
Self-reported identity, signed only by the claimant’s own key (e.g., PyPI).
TokenVerified
Bearer token validated against a platform API at time of claim (e.g., npm).
Authenticated
OAuth/OIDC challenge-response proving account control (e.g., GitHub).
Sovereign
End-to-end cryptographic identity chain with no third-party trust (auths native).
Implementations§
Trait Implementations§
Source§impl Clone for AssuranceLevel
impl Clone for AssuranceLevel
Source§fn clone(&self) -> AssuranceLevel
fn clone(&self) -> AssuranceLevel
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 AssuranceLevel
impl Debug for AssuranceLevel
Source§impl<'de> Deserialize<'de> for AssuranceLevel
impl<'de> Deserialize<'de> for AssuranceLevel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for AssuranceLevel
impl Display for AssuranceLevel
Source§impl FromStr for AssuranceLevel
impl FromStr for AssuranceLevel
Source§impl Hash for AssuranceLevel
impl Hash for AssuranceLevel
Source§impl Ord for AssuranceLevel
impl Ord for AssuranceLevel
Source§fn cmp(&self, other: &AssuranceLevel) -> Ordering
fn cmp(&self, other: &AssuranceLevel) -> 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 AssuranceLevel
impl PartialEq for AssuranceLevel
Source§impl PartialOrd for AssuranceLevel
impl PartialOrd for AssuranceLevel
Source§impl Serialize for AssuranceLevel
impl Serialize for AssuranceLevel
impl Copy for AssuranceLevel
impl Eq for AssuranceLevel
impl StructuralPartialEq for AssuranceLevel
Auto Trait Implementations§
impl Freeze for AssuranceLevel
impl RefUnwindSafe for AssuranceLevel
impl Send for AssuranceLevel
impl Sync for AssuranceLevel
impl Unpin for AssuranceLevel
impl UnsafeUnpin for AssuranceLevel
impl UnwindSafe for AssuranceLevel
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