Struct botapi::gen_types::EncryptedPassportElement
source · pub struct EncryptedPassportElement {
pub tg_type: String,
pub data: Option<String>,
pub phone_number: Option<String>,
pub email: Option<String>,
pub files: Option<Vec<PassportFile>>,
pub front_side: Option<BoxWrapper<Unbox<PassportFile>>>,
pub reverse_side: Option<BoxWrapper<Unbox<PassportFile>>>,
pub selfie: Option<BoxWrapper<Unbox<PassportFile>>>,
pub translation: Option<Vec<PassportFile>>,
pub hash: String,
}
Expand description
Describes documents or other Telegram Passport elements shared with the bot by the user.
Fields§
§tg_type: String
Element type. One of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”, “phone_number”, “email”.
data: Option<String>
Optional. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials.
phone_number: Option<String>
Optional. User’s verified phone number; available only for “phone_number” type
email: Option<String>
Optional. User’s verified email address; available only for “email” type
files: Option<Vec<PassportFile>>
Optional. Array of encrypted files with documents provided by the user; available only for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
front_side: Option<BoxWrapper<Unbox<PassportFile>>>
Optional. Encrypted file with the front side of the document, provided by the user; available only for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
reverse_side: Option<BoxWrapper<Unbox<PassportFile>>>
Optional. Encrypted file with the reverse side of the document, provided by the user; available only for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
selfie: Option<BoxWrapper<Unbox<PassportFile>>>
Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
translation: Option<Vec<PassportFile>>
Optional. Array of encrypted files with translated versions of documents provided by the user; available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
hash: String
Base64-encoded element hash for using in PassportElementErrorUnspecified
Implementations§
source§impl EncryptedPassportElement
impl EncryptedPassportElement
pub fn noskip(self) -> NoSkipEncryptedPassportElement
source§impl EncryptedPassportElement
impl EncryptedPassportElement
pub fn new(hash: String) -> Self
sourcepub fn get_tg_type<'a>(&'a self) -> &'a str
pub fn get_tg_type<'a>(&'a self) -> &'a str
Element type. One of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”, “phone_number”, “email”.
sourcepub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self
pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self
Element type. One of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”, “phone_number”, “email”.
sourcepub fn get_data<'a>(&'a self) -> Option<&'a str>
pub fn get_data<'a>(&'a self) -> Option<&'a str>
Optional. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials.
sourcepub fn set_data<'a>(&'a mut self, data: Option<String>) -> &'a mut Self
pub fn set_data<'a>(&'a mut self, data: Option<String>) -> &'a mut Self
Optional. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials.
sourcepub fn get_phone_number<'a>(&'a self) -> Option<&'a str>
pub fn get_phone_number<'a>(&'a self) -> Option<&'a str>
Optional. User’s verified phone number; available only for “phone_number” type
sourcepub fn set_phone_number<'a>(
&'a mut self,
phone_number: Option<String>,
) -> &'a mut Self
pub fn set_phone_number<'a>( &'a mut self, phone_number: Option<String>, ) -> &'a mut Self
Optional. User’s verified phone number; available only for “phone_number” type
sourcepub fn get_email<'a>(&'a self) -> Option<&'a str>
pub fn get_email<'a>(&'a self) -> Option<&'a str>
Optional. User’s verified email address; available only for “email” type
sourcepub fn set_email<'a>(&'a mut self, email: Option<String>) -> &'a mut Self
pub fn set_email<'a>(&'a mut self, email: Option<String>) -> &'a mut Self
Optional. User’s verified email address; available only for “email” type
sourcepub fn get_files<'a>(&'a self) -> Option<&'a Vec<PassportFile>>
pub fn get_files<'a>(&'a self) -> Option<&'a Vec<PassportFile>>
Optional. Array of encrypted files with documents provided by the user; available only for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
sourcepub fn set_files<'a>(
&'a mut self,
files: Option<Vec<PassportFile>>,
) -> &'a mut Self
pub fn set_files<'a>( &'a mut self, files: Option<Vec<PassportFile>>, ) -> &'a mut Self
Optional. Array of encrypted files with documents provided by the user; available only for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
sourcepub fn get_front_side<'a>(&'a self) -> Option<&'a PassportFile>
pub fn get_front_side<'a>(&'a self) -> Option<&'a PassportFile>
Optional. Encrypted file with the front side of the document, provided by the user; available only for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
sourcepub fn set_front_side<'a>(
&'a mut self,
front_side: Option<PassportFile>,
) -> &'a mut Self
pub fn set_front_side<'a>( &'a mut self, front_side: Option<PassportFile>, ) -> &'a mut Self
Optional. Encrypted file with the front side of the document, provided by the user; available only for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
sourcepub fn get_reverse_side<'a>(&'a self) -> Option<&'a PassportFile>
pub fn get_reverse_side<'a>(&'a self) -> Option<&'a PassportFile>
Optional. Encrypted file with the reverse side of the document, provided by the user; available only for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
sourcepub fn set_reverse_side<'a>(
&'a mut self,
reverse_side: Option<PassportFile>,
) -> &'a mut Self
pub fn set_reverse_side<'a>( &'a mut self, reverse_side: Option<PassportFile>, ) -> &'a mut Self
Optional. Encrypted file with the reverse side of the document, provided by the user; available only for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
sourcepub fn get_selfie<'a>(&'a self) -> Option<&'a PassportFile>
pub fn get_selfie<'a>(&'a self) -> Option<&'a PassportFile>
Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
sourcepub fn set_selfie<'a>(
&'a mut self,
selfie: Option<PassportFile>,
) -> &'a mut Self
pub fn set_selfie<'a>( &'a mut self, selfie: Option<PassportFile>, ) -> &'a mut Self
Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
sourcepub fn get_translation<'a>(&'a self) -> Option<&'a Vec<PassportFile>>
pub fn get_translation<'a>(&'a self) -> Option<&'a Vec<PassportFile>>
Optional. Array of encrypted files with translated versions of documents provided by the user; available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
sourcepub fn set_translation<'a>(
&'a mut self,
translation: Option<Vec<PassportFile>>,
) -> &'a mut Self
pub fn set_translation<'a>( &'a mut self, translation: Option<Vec<PassportFile>>, ) -> &'a mut Self
Optional. Array of encrypted files with translated versions of documents provided by the user; available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
sourcepub fn get_hash<'a>(&'a self) -> &'a str
pub fn get_hash<'a>(&'a self) -> &'a str
Base64-encoded element hash for using in PassportElementErrorUnspecified
sourcepub fn set_hash<'a>(&'a mut self, hash: String) -> &'a mut Self
pub fn set_hash<'a>(&'a mut self, hash: String) -> &'a mut Self
Base64-encoded element hash for using in PassportElementErrorUnspecified
Trait Implementations§
source§impl Clone for EncryptedPassportElement
impl Clone for EncryptedPassportElement
source§fn clone(&self) -> EncryptedPassportElement
fn clone(&self) -> EncryptedPassportElement
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EncryptedPassportElement
impl Debug for EncryptedPassportElement
source§impl Default for EncryptedPassportElement
impl Default for EncryptedPassportElement
source§fn default() -> EncryptedPassportElement
fn default() -> EncryptedPassportElement
source§impl<'de> Deserialize<'de> for EncryptedPassportElement
impl<'de> Deserialize<'de> for EncryptedPassportElement
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<BoxWrapper<Box<EncryptedPassportElement>>> for EncryptedPassportElement
impl From<BoxWrapper<Box<EncryptedPassportElement>>> for EncryptedPassportElement
source§fn from(t: BoxWrapper<Box<EncryptedPassportElement>>) -> Self
fn from(t: BoxWrapper<Box<EncryptedPassportElement>>) -> Self
source§impl From<BoxWrapper<Unbox<EncryptedPassportElement>>> for EncryptedPassportElement
impl From<BoxWrapper<Unbox<EncryptedPassportElement>>> for EncryptedPassportElement
source§fn from(t: BoxWrapper<Unbox<EncryptedPassportElement>>) -> Self
fn from(t: BoxWrapper<Unbox<EncryptedPassportElement>>) -> Self
source§impl From<NoSkipEncryptedPassportElement> for EncryptedPassportElement
impl From<NoSkipEncryptedPassportElement> for EncryptedPassportElement
source§fn from(t: NoSkipEncryptedPassportElement) -> Self
fn from(t: NoSkipEncryptedPassportElement) -> Self
source§impl Hash for EncryptedPassportElement
impl Hash for EncryptedPassportElement
source§impl Into<NoSkipEncryptedPassportElement> for EncryptedPassportElement
impl Into<NoSkipEncryptedPassportElement> for EncryptedPassportElement
source§fn into(self) -> NoSkipEncryptedPassportElement
fn into(self) -> NoSkipEncryptedPassportElement
source§impl Ord for EncryptedPassportElement
impl Ord for EncryptedPassportElement
source§fn cmp(&self, other: &EncryptedPassportElement) -> Ordering
fn cmp(&self, other: &EncryptedPassportElement) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for EncryptedPassportElement
impl PartialEq for EncryptedPassportElement
source§fn eq(&self, other: &EncryptedPassportElement) -> bool
fn eq(&self, other: &EncryptedPassportElement) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for EncryptedPassportElement
impl PartialOrd for EncryptedPassportElement
source§fn partial_cmp(&self, other: &EncryptedPassportElement) -> Option<Ordering>
fn partial_cmp(&self, other: &EncryptedPassportElement) -> 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 EncryptedPassportElement
impl Serialize for EncryptedPassportElement
impl Eq for EncryptedPassportElement
impl StructuralPartialEq for EncryptedPassportElement
Auto Trait Implementations§
impl Freeze for EncryptedPassportElement
impl RefUnwindSafe for EncryptedPassportElement
impl Send for EncryptedPassportElement
impl Sync for EncryptedPassportElement
impl Unpin for EncryptedPassportElement
impl UnwindSafe for EncryptedPassportElement
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.