pub struct CredentialRecord {
pub id: String,
pub issuer_did: String,
pub subject_did: String,
pub credential_type: String,
pub claims: Vec<(String, String)>,
pub issued_at_unix: u32,
pub issued_at_instant: Option<InstantBridge>,
pub expires_at_unix: Option<u32>,
pub expires_at_instant: Option<InstantBridge>,
pub verification_state: VerificationState,
}Expand description
A verifiable-credential envelope as held in the WellFair vault.
claims is an ordered key/value list (not a map) so presentation selection is deterministic
and duplicate keys round-trip faithfully. The credential is Restricted.
Fields§
§id: String§issuer_did: String§subject_did: String§credential_type: String§claims: Vec<(String, String)>§issued_at_unix: u32§issued_at_instant: Option<InstantBridge>High-resolution instant (T71 bridge). Preferred over issued_at_unix
when present; the u32 field is kept for backward-compatible deserialization.
expires_at_unix: Option<u32>§expires_at_instant: Option<InstantBridge>High-resolution expiry instant (T71 bridge). Preferred over
expires_at_unix when present.
verification_state: VerificationStateImplementations§
Source§impl CredentialRecord
impl CredentialRecord
Sourcepub fn new(
issuer_did: impl Into<String>,
subject_did: impl Into<String>,
credential_type: impl Into<String>,
issued_at_unix: u32,
) -> Self
pub fn new( issuer_did: impl Into<String>, subject_did: impl Into<String>, credential_type: impl Into<String>, issued_at_unix: u32, ) -> Self
Creates a new instance.
Sourcepub fn issued_at(&self) -> InstantBridge
pub fn issued_at(&self) -> InstantBridge
Resolve the issued-at instant, preferring the high-resolution
InstantBridge field when present (T71 bridge).
Sourcepub fn expires_at(&self) -> Option<InstantBridge>
pub fn expires_at(&self) -> Option<InstantBridge>
Resolve the expiry instant, preferring the high-resolution
InstantBridge field when present (T71 bridge).
Trait Implementations§
Source§impl Clone for CredentialRecord
impl Clone for CredentialRecord
Source§impl Debug for CredentialRecord
impl Debug for CredentialRecord
Source§impl<'de> Deserialize<'de> for CredentialRecord
impl<'de> Deserialize<'de> for CredentialRecord
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
impl Eq for CredentialRecord
Source§impl PartialEq for CredentialRecord
impl PartialEq for CredentialRecord
Source§impl Serialize for CredentialRecord
impl Serialize for CredentialRecord
impl StructuralPartialEq for CredentialRecord
Auto Trait Implementations§
impl Freeze for CredentialRecord
impl RefUnwindSafe for CredentialRecord
impl Send for CredentialRecord
impl Sync for CredentialRecord
impl Unpin for CredentialRecord
impl UnsafeUnpin for CredentialRecord
impl UnwindSafe for CredentialRecord
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