[−][src]Struct tgbot::types::PassportElementError
Error in the Telegram Passport element which was submitted that should be resolved by the user
Methods
impl PassportElementError
[src]
pub fn data_field<S: Into<String>>(
kind: EncryptedPassportElementKind,
field_name: S,
data_hash: S,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
[src]
kind: EncryptedPassportElementKind,
field_name: S,
data_hash: S,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
Represents an issue in one of the data fields that was provided by the user The error is considered resolved when the field's value changes
Arguments
- kind - The section of the user's Telegram Passport which has the error, one of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”
- field_name - Name of the data field which has the error
- data_hash - Base64-encoded data hash
- message - Error message
pub fn front_side<S: Into<String>>(
kind: EncryptedPassportElementKind,
file_hash: S,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
[src]
kind: EncryptedPassportElementKind,
file_hash: S,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
Represents an issue with the front side of a document The error is considered resolved when the file with the front side of the document changes
Arguments
- kind - The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”
- file_hash - Base64-encoded hash of the file with the front side of the document
- message - Error message
pub fn reverse_side<S: Into<String>>(
kind: EncryptedPassportElementKind,
file_hash: S,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
[src]
kind: EncryptedPassportElementKind,
file_hash: S,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
Represents an issue with the reverse side of a document The error is considered resolved when the file with reverse side of the document changes
Arguments
- kind - The section of the user's Telegram Passport which has the issue, one of “driver_license”, “identity_card”
- file_hash - Base64-encoded hash of the file with the reverse side of the document
- message - Error message
pub fn selfie<S: Into<String>>(
kind: EncryptedPassportElementKind,
file_hash: S,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
[src]
kind: EncryptedPassportElementKind,
file_hash: S,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
Represents an issue with the selfie with a document The error is considered resolved when the file with the selfie changes
Arguments
- kind - The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”
- file_hash - Base64-encoded hash of the file with the selfie
- message - Error message
pub fn file<S: Into<String>>(
kind: EncryptedPassportElementKind,
file_hash: S,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
[src]
kind: EncryptedPassportElementKind,
file_hash: S,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
Represents an issue with a document scan The error is considered resolved when the file with the document scan changes
Arguments
- kind - The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”
- file_hash - Base64-encoded hash of the file with the selfie
- message - Error message
pub fn files<S: Into<String>>(
kind: EncryptedPassportElementKind,
file_hashes: Vec<String>,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
[src]
kind: EncryptedPassportElementKind,
file_hashes: Vec<String>,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
Represents an issue with a list of scans The error is considered resolved when the list of files containing the scans changes
Arguments
- kind - The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”
- file_hashes - List of base64-encoded file hashes
- message - Error message
pub fn translation_file<S: Into<String>>(
kind: EncryptedPassportElementKind,
file_hash: S,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
[src]
kind: EncryptedPassportElementKind,
file_hash: S,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
Represents an issue with one of the files that constitute the translation of a document The error is considered resolved when the file changes
Arguments
- kind - Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”
- file_hash - Base64-encoded hash of the file with the selfie
- message - Error message
pub fn translation_files<S: Into<String>>(
kind: EncryptedPassportElementKind,
file_hashes: Vec<String>,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
[src]
kind: EncryptedPassportElementKind,
file_hashes: Vec<String>,
message: S
) -> Result<Self, UnexpectedEncryptedPassportElementKind>
Represents an issue with the translated version of a document The error is considered resolved when a file with the document translation change
Arguments
- kind - Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”
- file_hashes - List of base64-encoded file hashes
- message - Error message
pub fn unspecified<S: Into<String>>(
kind: EncryptedPassportElementKind,
element_hash: S,
message: S
) -> Self
[src]
kind: EncryptedPassportElementKind,
element_hash: S,
message: S
) -> Self
Represents an issue in an unspecified place The error is considered resolved when new data is added
Arguments
- kind - Type of element of the user's Telegram Passport which has the issue
- element_hash - Base64-encoded element hash
- message - Error message
Trait Implementations
impl Clone for PassportElementError
[src]
fn clone(&self) -> PassportElementError
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PassportElementError
[src]
impl Serialize for PassportElementError
[src]
Auto Trait Implementations
impl RefUnwindSafe for PassportElementError
impl Send for PassportElementError
impl Sync for PassportElementError
impl Unpin for PassportElementError
impl UnwindSafe for PassportElementError
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,