pub struct EncryptedPassportElementDriverLicense {
pub data: String,
pub front_side: PassportFile,
pub hash: String,
pub selfie: PassportFile,
pub reverse_side: PassportFile,
pub translation: Option<Vec<PassportFile>>,
}
Expand description
Represents a driver license.
Fields§
§data: String
A base64-encoded encrypted Telegram Passport element data provided by a user.
Can be decrypted and verified using
the accompanying EncryptedCredentials
.
front_side: PassportFile
An encrypted file with a front side of a document, provided by a user.
The file can be decrypted and verified
using the accompanying EncryptedCredentials
.
hash: String
A base64-encoded element hash for
using in crate::types::PassportElementError::unspecified
.
selfie: PassportFile
An encrypted file with a selfie of a user holding a document, provided by a user.
The file can be decrypted and verified
using the accompanying EncryptedCredentials
.
reverse_side: PassportFile
An encrypted file with a reverse side of a document, provided by a user.
The file can be decrypted and verified
using the accompanying EncryptedCredentials
.
translation: Option<Vec<PassportFile>>
An array of encrypted files with translated versions of documents provided by a user.
Files can be decrypted and verified
using the accompanying EncryptedCredentials
.
Implementations§
source§impl EncryptedPassportElementDriverLicense
impl EncryptedPassportElementDriverLicense
sourcepub fn new<A, B>(
data: A,
hash: B,
front_side: PassportFile,
reverse_side: PassportFile,
selfie: PassportFile
) -> Self
pub fn new<A, B>( data: A, hash: B, front_side: PassportFile, reverse_side: PassportFile, selfie: PassportFile ) -> Self
Creates a new EncryptedPassportElementDriverLicense
.
§Arguments
data
- An encrypted data provided by a user.hash
- An element hash.front_side
- An encrypted file with a front side of a document.reverse_side
- An encrypted file with a reverse side of a document.selfie
- An encrypted file with a selfie of a user.
sourcepub fn with_translation<T>(self, value: T) -> Selfwhere
T: IntoIterator<Item = PassportFile>,
pub fn with_translation<T>(self, value: T) -> Selfwhere
T: IntoIterator<Item = PassportFile>,
Sets a new translation.
§Arguments
value
- An array of encrypted files with translated versions of documents.
Trait Implementations§
source§impl Clone for EncryptedPassportElementDriverLicense
impl Clone for EncryptedPassportElementDriverLicense
source§fn clone(&self) -> EncryptedPassportElementDriverLicense
fn clone(&self) -> EncryptedPassportElementDriverLicense
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'de> Deserialize<'de> for EncryptedPassportElementDriverLicense
impl<'de> Deserialize<'de> for EncryptedPassportElementDriverLicense
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>,
source§impl From<EncryptedPassportElementDriverLicense> for EncryptedPassportElement
impl From<EncryptedPassportElementDriverLicense> for EncryptedPassportElement
source§fn from(
original: EncryptedPassportElementDriverLicense
) -> EncryptedPassportElement
fn from( original: EncryptedPassportElementDriverLicense ) -> EncryptedPassportElement
source§impl PartialEq for EncryptedPassportElementDriverLicense
impl PartialEq for EncryptedPassportElementDriverLicense
source§fn eq(&self, other: &EncryptedPassportElementDriverLicense) -> bool
fn eq(&self, other: &EncryptedPassportElementDriverLicense) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for EncryptedPassportElementDriverLicense
impl PartialOrd for EncryptedPassportElementDriverLicense
source§fn partial_cmp(
&self,
other: &EncryptedPassportElementDriverLicense
) -> Option<Ordering>
fn partial_cmp( &self, other: &EncryptedPassportElementDriverLicense ) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more