IdentityDocumentCredential

Struct IdentityDocumentCredential 

Source
pub struct IdentityDocumentCredential<E = ()> {
    pub issuing_country: Option<EditableField<EditableFieldCountryCode, E>>,
    pub document_number: Option<EditableField<EditableFieldString, E>>,
    pub identification_number: Option<EditableField<EditableFieldString, E>>,
    pub nationality: Option<EditableField<EditableFieldString, E>>,
    pub full_name: Option<EditableField<EditableFieldString, E>>,
    pub birth_date: Option<EditableField<EditableFieldDate, E>>,
    pub birth_place: Option<EditableField<EditableFieldString, E>>,
    pub sex: Option<EditableField<EditableFieldString, E>>,
    pub issue_date: Option<EditableField<EditableFieldDate, E>>,
    pub expiry_date: Option<EditableField<EditableFieldDate, E>>,
    pub issuing_authority: Option<EditableField<EditableFieldString, E>>,
}
Expand description

An IdentityDocumentCredential is for any document, card, or number identifying a person or entity. Examples include national ID cards, Social Security Numbers (SSN), Tax Identification Numbers (TIN), health insurance cards, or Value-Added Tax (VAT) numbers.

Credentials like the SSN can still be encoded as an IdentityDocument by only providing the identificationNumber field, since the others are generally considered to be undefined in its case.

Note: Driver’s licenses and passports may be accepted as identity verification in some countries, but they are specified separately in the DriversLicenseCredential and PassportCredential types, respectively.

Fields§

§issuing_country: Option<EditableField<EditableFieldCountryCode, E>>

The document’s issuing country. This MUST conform to the ISO 3166-1 alpha-2 format.

§document_number: Option<EditableField<EditableFieldString, E>>

The document’s identifying number. This identifying number is tied to the issuance of the document and is expected to change upon its reissuance, even when the person’s information might remain the same.

§identification_number: Option<EditableField<EditableFieldString, E>>

The person’s or other entity’s identification number. This identifying number is generally expected to remain stable across reissuances of the identity document itself. For identification numbers that are not an identity document (e.g., SSN, TIN, or VAT), this field is generally the only one that’s expected to be present in the credential.

§nationality: Option<EditableField<EditableFieldString, E>>

The person’s nationality.

§full_name: Option<EditableField<EditableFieldString, E>>

The person’s full name.

§birth_date: Option<EditableField<EditableFieldDate, E>>

The person’s date of birth.

§birth_place: Option<EditableField<EditableFieldString, E>>

The person’s place of birth.

§sex: Option<EditableField<EditableFieldString, E>>

The person’s sex or gender.

§issue_date: Option<EditableField<EditableFieldDate, E>>

The date on which the document was issued.

§expiry_date: Option<EditableField<EditableFieldDate, E>>

The date on which the document expires.

§issuing_authority: Option<EditableField<EditableFieldString, E>>

The official body or government agency responsible for issuing the document.

Trait Implementations§

Source§

impl<E: Clone> Clone for IdentityDocumentCredential<E>

Source§

fn clone(&self) -> IdentityDocumentCredential<E>

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<E: Debug> Debug for IdentityDocumentCredential<E>

Source§

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

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

impl<E: Default> Default for IdentityDocumentCredential<E>

Source§

fn default() -> IdentityDocumentCredential<E>

Returns the “default value” for a type. Read more
Source§

impl<'de, E> Deserialize<'de> for IdentityDocumentCredential<E>
where E: Deserialize<'de>,

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<E> Serialize for IdentityDocumentCredential<E>
where E: Serialize,

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

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> 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>,