pub struct EncryptedPassportElementIdentityCard {
pub data: String,
pub front_side: PassportFile,
pub hash: String,
pub reverse_side: PassportFile,
pub selfie: PassportFile,
pub translation: Option<Vec<PassportFile>>,
}
Expand description
Represents an identity card.
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
.
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
.
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 EncryptedPassportElementIdentityCard
impl EncryptedPassportElementIdentityCard
sourcepub fn new<A, B>(
data: A,
hash: B,
front_side: PassportFile,
reverse_side: PassportFile,
selfie: PassportFile
) -> EncryptedPassportElementIdentityCard
pub fn new<A, B>( data: A, hash: B, front_side: PassportFile, reverse_side: PassportFile, selfie: PassportFile ) -> EncryptedPassportElementIdentityCard
Creates a new EncryptedPassportElementIdentityCard
.
§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
) -> EncryptedPassportElementIdentityCardwhere
T: IntoIterator<Item = PassportFile>,
pub fn with_translation<T>(
self,
value: T
) -> EncryptedPassportElementIdentityCardwhere
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 EncryptedPassportElementIdentityCard
impl Clone for EncryptedPassportElementIdentityCard
source§fn clone(&self) -> EncryptedPassportElementIdentityCard
fn clone(&self) -> EncryptedPassportElementIdentityCard
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 EncryptedPassportElementIdentityCard
impl<'de> Deserialize<'de> for EncryptedPassportElementIdentityCard
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<EncryptedPassportElementIdentityCard, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<EncryptedPassportElementIdentityCard, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl From<EncryptedPassportElementIdentityCard> for EncryptedPassportElement
impl From<EncryptedPassportElementIdentityCard> for EncryptedPassportElement
source§fn from(
original: EncryptedPassportElementIdentityCard
) -> EncryptedPassportElement
fn from( original: EncryptedPassportElementIdentityCard ) -> EncryptedPassportElement
source§impl PartialEq for EncryptedPassportElementIdentityCard
impl PartialEq for EncryptedPassportElementIdentityCard
source§fn eq(&self, other: &EncryptedPassportElementIdentityCard) -> bool
fn eq(&self, other: &EncryptedPassportElementIdentityCard) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for EncryptedPassportElementIdentityCard
impl PartialOrd for EncryptedPassportElementIdentityCard
source§fn partial_cmp(
&self,
other: &EncryptedPassportElementIdentityCard
) -> Option<Ordering>
fn partial_cmp( &self, other: &EncryptedPassportElementIdentityCard ) -> 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 EncryptedPassportElementIdentityCard
impl Serialize for EncryptedPassportElementIdentityCard
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 EncryptedPassportElementIdentityCard
Auto Trait Implementations§
impl Freeze for EncryptedPassportElementIdentityCard
impl RefUnwindSafe for EncryptedPassportElementIdentityCard
impl Send for EncryptedPassportElementIdentityCard
impl Sync for EncryptedPassportElementIdentityCard
impl Unpin for EncryptedPassportElementIdentityCard
impl UnwindSafe for EncryptedPassportElementIdentityCard
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