Struct carapax::types::EncryptedPassportElementPassport
source · pub struct EncryptedPassportElementPassport {
pub data: String,
pub front_side: PassportFile,
pub hash: String,
pub selfie: PassportFile,
pub translation: Option<Vec<PassportFile>>,
}
Expand description
Represents a 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 the document, provided by a user.
The file can be decrypted and verified
using the accompanying EncryptedCredentials
.
hash: String
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 EncryptedPassportElementPassport
impl EncryptedPassportElementPassport
sourcepub fn new<A, B>(
data: A,
hash: B,
front_side: PassportFile,
selfie: PassportFile
) -> EncryptedPassportElementPassport
pub fn new<A, B>( data: A, hash: B, front_side: PassportFile, selfie: PassportFile ) -> EncryptedPassportElementPassport
Creates a new EncryptedPassportElementPassport
.
§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) -> EncryptedPassportElementPassportwhere
T: IntoIterator<Item = PassportFile>,
pub fn with_translation<T>(self, value: T) -> EncryptedPassportElementPassportwhere
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 EncryptedPassportElementPassport
impl Clone for EncryptedPassportElementPassport
source§fn clone(&self) -> EncryptedPassportElementPassport
fn clone(&self) -> EncryptedPassportElementPassport
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 EncryptedPassportElementPassport
impl<'de> Deserialize<'de> for EncryptedPassportElementPassport
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<EncryptedPassportElementPassport, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<EncryptedPassportElementPassport, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl From<EncryptedPassportElementPassport> for EncryptedPassportElement
impl From<EncryptedPassportElementPassport> for EncryptedPassportElement
source§fn from(original: EncryptedPassportElementPassport) -> EncryptedPassportElement
fn from(original: EncryptedPassportElementPassport) -> EncryptedPassportElement
source§impl PartialEq for EncryptedPassportElementPassport
impl PartialEq for EncryptedPassportElementPassport
source§fn eq(&self, other: &EncryptedPassportElementPassport) -> bool
fn eq(&self, other: &EncryptedPassportElementPassport) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for EncryptedPassportElementPassport
impl PartialOrd for EncryptedPassportElementPassport
source§fn partial_cmp(
&self,
other: &EncryptedPassportElementPassport
) -> Option<Ordering>
fn partial_cmp( &self, other: &EncryptedPassportElementPassport ) -> 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 EncryptedPassportElementPassport
impl Serialize for EncryptedPassportElementPassport
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 EncryptedPassportElementPassport
Auto Trait Implementations§
impl Freeze for EncryptedPassportElementPassport
impl RefUnwindSafe for EncryptedPassportElementPassport
impl Send for EncryptedPassportElementPassport
impl Sync for EncryptedPassportElementPassport
impl Unpin for EncryptedPassportElementPassport
impl UnwindSafe for EncryptedPassportElementPassport
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