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
) -> EncryptedPassportElementDriverLicense
pub fn new<A, B>( data: A, hash: B, front_side: PassportFile, reverse_side: PassportFile, selfie: PassportFile ) -> EncryptedPassportElementDriverLicense
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
) -> EncryptedPassportElementDriverLicensewhere
T: IntoIterator<Item = PassportFile>,
pub fn with_translation<T>(
self,
value: T
) -> EncryptedPassportElementDriverLicensewhere
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<EncryptedPassportElementDriverLicense, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<EncryptedPassportElementDriverLicense, <__D as Deserializer<'de>>::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 moresource§impl Serialize for EncryptedPassportElementDriverLicense
impl Serialize for EncryptedPassportElementDriverLicense
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for EncryptedPassportElementDriverLicense
Auto Trait Implementations§
impl Freeze for EncryptedPassportElementDriverLicense
impl RefUnwindSafe for EncryptedPassportElementDriverLicense
impl Send for EncryptedPassportElementDriverLicense
impl Sync for EncryptedPassportElementDriverLicense
impl Unpin for EncryptedPassportElementDriverLicense
impl UnwindSafe for EncryptedPassportElementDriverLicense
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more