pub struct VerifiableCredential {
pub context: Vec<String>,
pub id: String,
pub credential_type: Vec<String>,
pub issuer: CredentialIssuer,
pub issuance_date: DateTime<Utc>,
pub expiration_date: Option<DateTime<Utc>>,
pub credential_subject: CredentialSubject,
pub proof: Option<CredentialProof>,
}Expand description
A W3C Verifiable Credential.
This structure follows the W3C Verifiable Credentials Data Model v2.0. Credentials attest to claims about a subject (an agent) made by an issuer (typically the CELLSTATE platform or tenant).
Fields§
§context: Vec<String>JSON-LD context URIs
id: StringUnique identifier for this credential (URN or URL)
credential_type: Vec<String>The types of this credential (always includes “VerifiableCredential”)
issuer: CredentialIssuerWho issued this credential
issuance_date: DateTime<Utc>When this credential was issued
expiration_date: Option<DateTime<Utc>>When this credential expires (if applicable)
credential_subject: CredentialSubjectThe subject and claims of this credential
proof: Option<CredentialProof>Cryptographic proof (if signed)
Trait Implementations§
Source§impl Clone for VerifiableCredential
impl Clone for VerifiableCredential
Source§fn clone(&self) -> VerifiableCredential
fn clone(&self) -> VerifiableCredential
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 VerifiableCredential
impl Debug for VerifiableCredential
Source§impl<'de> Deserialize<'de> for VerifiableCredential
impl<'de> Deserialize<'de> for VerifiableCredential
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
Auto Trait Implementations§
impl Freeze for VerifiableCredential
impl RefUnwindSafe for VerifiableCredential
impl Send for VerifiableCredential
impl Sync for VerifiableCredential
impl Unpin for VerifiableCredential
impl UnwindSafe for VerifiableCredential
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