Skip to main content

AcademicCredential

Struct AcademicCredential 

Source
pub struct AcademicCredential {
Show 20 fields pub credential_id: CredentialId, pub subject_address: Address, pub subcode: DocSubcode, pub subject_commitment: [u8; 32], pub issuer: Address, pub institution_id: String, pub jurisdiction: String, pub schema_hash: [u8; 32], pub content_commitment: [u8; 32], pub metadata: CredentialMetadata, pub issued_at: Timestamp, pub valid_from: Timestamp, pub expires_at: Timestamp, pub payload_hash: Option<[u8; 32]>, pub payload_hint: Option<String>, pub encryption_meta: Option<EncryptionMeta>, pub issuer_signature: [u8; 64], pub issuer_key_id: String, pub revocation_status: RevocationStatus, pub superseded_by: Option<CredentialId>,
}
Expand description

Base structure for academic/professional credentials

Fields§

§credential_id: CredentialId

Unique credential ID

§subject_address: Address

Subject wallet address (for token ownership)

§subcode: DocSubcode

Document subcode (810, 811, 812, or 813)

§subject_commitment: [u8; 32]

Subject commitment (NOT the subject’s real identity)

§issuer: Address

Issuer address (institution)

§institution_id: String

Institution identifier (e.g., “UCLA”, “MIT”)

§jurisdiction: String

Jurisdiction/country (ISO 3166-1 alpha-2)

§schema_hash: [u8; 32]

Schema hash defining the credential structure

§content_commitment: [u8; 32]

Commitment to the credential content

§metadata: CredentialMetadata

Credential metadata (non-PII, public info)

§issued_at: Timestamp

Issuance timestamp

§valid_from: Timestamp

Valid from timestamp

§expires_at: Timestamp

Expiry timestamp (0 = no expiry for most degrees)

§payload_hash: Option<[u8; 32]>

Optional encrypted payload reference

§payload_hint: Option<String>

Optional payload hint (storage location)

§encryption_meta: Option<EncryptionMeta>

Optional encryption metadata (algorithm, key commitment, nonce)

§issuer_signature: [u8; 64]

Issuer signature

§issuer_key_id: String

Key ID used for signing

§revocation_status: RevocationStatus

Revocation status

§superseded_by: Option<CredentialId>

If superseded, the new credential ID

Trait Implementations§

Source§

impl Clone for AcademicCredential

Source§

fn clone(&self) -> AcademicCredential

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AcademicCredential

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AcademicCredential

Source§

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 PartialEq for AcademicCredential

Source§

fn eq(&self, other: &AcademicCredential) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for AcademicCredential

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for AcademicCredential

Source§

impl StructuralPartialEq for AcademicCredential

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,