pub struct EncryptedPassportElementInternalPassport {
pub data: String,
pub front_side: PassportFile,
pub hash: String,
pub selfie: PassportFile,
pub translation: Option<Vec<PassportFile>>,
}
Expand description
Represents an internal passport.
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
.
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 EncryptedPassportElementInternalPassport
impl EncryptedPassportElementInternalPassport
sourcepub fn new<A, B>(
data: A,
hash: B,
front_side: PassportFile,
selfie: PassportFile
) -> Self
pub fn new<A, B>( data: A, hash: B, front_side: PassportFile, selfie: PassportFile ) -> Self
Creates a new EncryptedPassportElementInternalPassport
.
§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.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 EncryptedPassportElementInternalPassport
impl Clone for EncryptedPassportElementInternalPassport
source§fn clone(&self) -> EncryptedPassportElementInternalPassport
fn clone(&self) -> EncryptedPassportElementInternalPassport
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 EncryptedPassportElementInternalPassport
impl<'de> Deserialize<'de> for EncryptedPassportElementInternalPassport
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<EncryptedPassportElementInternalPassport> for EncryptedPassportElement
impl From<EncryptedPassportElementInternalPassport> for EncryptedPassportElement
source§fn from(
original: EncryptedPassportElementInternalPassport
) -> EncryptedPassportElement
fn from( original: EncryptedPassportElementInternalPassport ) -> EncryptedPassportElement
source§impl PartialEq for EncryptedPassportElementInternalPassport
impl PartialEq for EncryptedPassportElementInternalPassport
source§fn eq(&self, other: &EncryptedPassportElementInternalPassport) -> bool
fn eq(&self, other: &EncryptedPassportElementInternalPassport) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for EncryptedPassportElementInternalPassport
impl PartialOrd for EncryptedPassportElementInternalPassport
source§fn partial_cmp(
&self,
other: &EncryptedPassportElementInternalPassport
) -> Option<Ordering>
fn partial_cmp( &self, other: &EncryptedPassportElementInternalPassport ) -> 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