pub struct PassportElementError { /* private fields */ }Expand description
Represents an error in the Telegram Passport element which was submitted that should be resolved by a user.
Implementations§
Source§impl PassportElementError
impl PassportElementError
Sourcepub fn data_field<A, B, C>(
element_type: EncryptedPassportElementType,
field_name: A,
data_hash: B,
message: C,
) -> Result<Self, UnexpectedEncryptedPassportElementType>
pub fn data_field<A, B, C>( element_type: EncryptedPassportElementType, field_name: A, data_hash: B, message: C, ) -> Result<Self, UnexpectedEncryptedPassportElementType>
Creates a new PassportElementError.
Represents an issue in one of a data fields that was provided by a user. The error is considered resolved when the field’s value changes.
§Arguments
element_type- A section of the user’s Telegram Passport which has the error.field_name- A name of a data field which has the error.data_hash- A base64-encoded data hash.message- An error message.
Supported element types:
Sourcepub fn front_side<A, B>(
element_type: EncryptedPassportElementType,
file_hash: A,
message: B,
) -> Result<Self, UnexpectedEncryptedPassportElementType>
pub fn front_side<A, B>( element_type: EncryptedPassportElementType, file_hash: A, message: B, ) -> Result<Self, UnexpectedEncryptedPassportElementType>
Creates a new PassportElementError.
Represents an issue with the front side of a document. The error is considered resolved when a file with the front side of the document changes.
§Arguments
element_type- A section of a user’s Telegram Passport which has the error.file_hash- A base64-encoded hash of the file with the front side of the document.message- An error message.
Supported element types:
Sourcepub fn reverse_side<A, B>(
element_type: EncryptedPassportElementType,
file_hash: A,
message: B,
) -> Result<Self, UnexpectedEncryptedPassportElementType>
pub fn reverse_side<A, B>( element_type: EncryptedPassportElementType, file_hash: A, message: B, ) -> Result<Self, UnexpectedEncryptedPassportElementType>
Creates a new PassportElementError.
Represents an issue with the reverse side of a document. The error is considered resolved when a file with reverse side of the document changes.
§Arguments
element_type- A section of the user’s Telegram Passport which has the error.file_hash- A base64-encoded hash of the file with the reverse side of the document.message- An error message.
Supported element types:
Sourcepub fn selfie<A, B>(
element_type: EncryptedPassportElementType,
file_hash: A,
message: B,
) -> Result<Self, UnexpectedEncryptedPassportElementType>
pub fn selfie<A, B>( element_type: EncryptedPassportElementType, file_hash: A, message: B, ) -> Result<Self, UnexpectedEncryptedPassportElementType>
Creates a new PassportElementError.
Represents an issue with the selfie with a document. The error is considered resolved when a file with the selfie changes.
§Arguments
element_type- A section of the user’s Telegram Passport which has the error.file_hash- A base64-encoded hash of the file with the selfie.message- An error message.
Supported element types:
Sourcepub fn file<A, B>(
element_type: EncryptedPassportElementType,
file_hash: A,
message: B,
) -> Result<Self, UnexpectedEncryptedPassportElementType>
pub fn file<A, B>( element_type: EncryptedPassportElementType, file_hash: A, message: B, ) -> Result<Self, UnexpectedEncryptedPassportElementType>
Creates a new PassportElementError.
Represents an issue with a document scan. The error is considered resolved when a file with the document scan changes.
§Arguments
element_type- The section of the user’s Telegram Passport which has the error.file_hash- A base64-encoded hash of the file with the selfie.message- An error message.
Supported element types:
Sourcepub fn files<A, B, C>(
element_type: EncryptedPassportElementType,
file_hashes: A,
message: C,
) -> Result<Self, UnexpectedEncryptedPassportElementType>
pub fn files<A, B, C>( element_type: EncryptedPassportElementType, file_hashes: A, message: C, ) -> Result<Self, UnexpectedEncryptedPassportElementType>
Creates a new PassportElementError.
Represents an issue with a list of scans. The error is considered resolved when a list of files containing the scans changes.
§Arguments
element_type- A section of the user’s Telegram Passport which has the error.file_hashes- A list of base64-encoded file hashes.message- An error message.
Supported element types:
Sourcepub fn translation_file<A, B>(
element_type: EncryptedPassportElementType,
file_hash: A,
message: B,
) -> Result<Self, UnexpectedEncryptedPassportElementType>
pub fn translation_file<A, B>( element_type: EncryptedPassportElementType, file_hash: A, message: B, ) -> Result<Self, UnexpectedEncryptedPassportElementType>
Creates a new PassportElementError.
Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when a file changes.
§Arguments
element_type- A type of element of the user’s Telegram Passport which has the error.file_hash- A base64-encoded hash of the file with the selfie.message- An error message.
Supported element types:
EncryptedPassportElementType::BankStatementEncryptedPassportElementType::DriverLicenseEncryptedPassportElementType::IdentityCardEncryptedPassportElementType::InternalPassportEncryptedPassportElementType::PassportEncryptedPassportElementType::PassportRegistrationEncryptedPassportElementType::RentalAgreementEncryptedPassportElementType::TemporaryRegistrationEncryptedPassportElementType::UtilityBill
Sourcepub fn translation_files<A, B, C>(
element_type: EncryptedPassportElementType,
file_hashes: A,
message: C,
) -> Result<Self, UnexpectedEncryptedPassportElementType>
pub fn translation_files<A, B, C>( element_type: EncryptedPassportElementType, file_hashes: A, message: C, ) -> Result<Self, UnexpectedEncryptedPassportElementType>
Creates a new PassportElementError.
Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation changes.
§Arguments
element_type- A type of element of the user’s Telegram Passport which has the error.file_hashes- A list of base64-encoded file hashes.message- An error message.
Supported element types:
EncryptedPassportElementType::BankStatementEncryptedPassportElementType::DriverLicenseEncryptedPassportElementType::IdentityCardEncryptedPassportElementType::InternalPassportEncryptedPassportElementType::PassportEncryptedPassportElementType::PassportRegistrationEncryptedPassportElementType::RentalAgreementEncryptedPassportElementType::TemporaryRegistrationEncryptedPassportElementType::UtilityBill
Sourcepub fn unspecified<A, B>(
element_type: EncryptedPassportElementType,
element_hash: A,
message: B,
) -> Self
pub fn unspecified<A, B>( element_type: EncryptedPassportElementType, element_hash: A, message: B, ) -> Self
Creates a new PassportElementError.
Represents an issue in an unspecified place. The error is considered resolved when new data is added.
§Arguments
element_type- A type of element of the user’s Telegram Passport which has the error.element_hash- A base64-encoded element hash.message- An error message.
Accepts any variant of EncryptedPassportElementType.
Trait Implementations§
Source§impl Clone for PassportElementError
impl Clone for PassportElementError
Source§fn clone(&self) -> PassportElementError
fn clone(&self) -> PassportElementError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more