[][src]Struct tgbot::types::PassportElementError

pub struct PassportElementError { /* fields omitted */ }

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

impl Debug for PassportElementError[src]

impl Serialize for PassportElementError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.