#[non_exhaustive]pub enum CredentialStatus<'a> {
Vcdm(&'a TypedObject),
SdJwt(&'a Status),
}Available on crate feature
vc only.Expand description
A status entry of a credential, of either credential format, for a StatusCheck.
§Examples
use identity_kit::vc::TypedObject;
use identity_kit::vc::validation::CredentialStatus;
let entry: TypedObject = serde_json::from_value(serde_json::json!({
"id": "https://example.com/credentials/status/3#94567",
"type": "BitstringStatusListEntry",
}))?;
assert_eq!(CredentialStatus::Vcdm(&entry).mechanism(), "BitstringStatusListEntry");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.
Vcdm(&'a TypedObject)
A credentialStatus entry of a VCDM credential.
SdJwt(&'a Status)
Available on crate feature
sd-jwt only.The status claim of an SD-JWT VC, of a VCDM 2.0 credential secured with SD-JWT, or of
a JWT credential of either profile (IETF Token Status List §6.1 and other mechanisms).
Implementations§
Source§impl CredentialStatus<'_>
impl CredentialStatus<'_>
Sourcepub fn mechanism(&self) -> String
pub fn mechanism(&self) -> String
What a check reports as StatusError::Unsupported for this entry: the type of a
credentialStatus entry, or the names of the mechanisms in a status claim
(status_list, and the members of other mechanisms), comma separated.
Trait Implementations§
Source§impl<'a> Clone for CredentialStatus<'a>
impl<'a> Clone for CredentialStatus<'a>
impl<'a> Copy for CredentialStatus<'a>
Source§impl<'a> Debug for CredentialStatus<'a>
impl<'a> Debug for CredentialStatus<'a>
Source§impl<'a> PartialEq for CredentialStatus<'a>
impl<'a> PartialEq for CredentialStatus<'a>
impl<'a> StructuralPartialEq for CredentialStatus<'a>
Auto Trait Implementations§
impl<'a> Freeze for CredentialStatus<'a>
impl<'a> RefUnwindSafe for CredentialStatus<'a>
impl<'a> Send for CredentialStatus<'a>
impl<'a> Sync for CredentialStatus<'a>
impl<'a> Unpin for CredentialStatus<'a>
impl<'a> UnsafeUnpin for CredentialStatus<'a>
impl<'a> UnwindSafe for CredentialStatus<'a>
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