pub struct PassportElementErrorTranslationFileBuilder {
pub source: String,
pub tg_type: String,
pub file_hash: String,
pub message: String,
}Expand description
Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.
Fields§
§source: StringError source, must be translation_file
tg_type: StringType 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: StringBase64-encoded file hash
message: StringError message
Implementations§
Source§impl PassportElementErrorTranslationFileBuilder
impl PassportElementErrorTranslationFileBuilder
pub fn new(source: String, file_hash: String, message: String) -> Self
Sourcepub fn set_source(self, source: String) -> Self
pub fn set_source(self, source: String) -> Self
Error source, must be translation_file
Sourcepub fn set_type(self, tg_type: String) -> Self
pub fn set_type(self, tg_type: String) -> Self
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”
Sourcepub fn set_file_hash(self, file_hash: String) -> Self
pub fn set_file_hash(self, file_hash: String) -> Self
Base64-encoded file hash
Sourcepub fn set_message(self, message: String) -> Self
pub fn set_message(self, message: String) -> Self
Error message
pub fn build(self) -> PassportElementErrorTranslationFile
Trait Implementations§
Source§impl Clone for PassportElementErrorTranslationFileBuilder
impl Clone for PassportElementErrorTranslationFileBuilder
Source§fn clone(&self) -> PassportElementErrorTranslationFileBuilder
fn clone(&self) -> PassportElementErrorTranslationFileBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for PassportElementErrorTranslationFileBuilder
impl Default for PassportElementErrorTranslationFileBuilder
Source§fn default() -> PassportElementErrorTranslationFileBuilder
fn default() -> PassportElementErrorTranslationFileBuilder
Source§impl<'de> Deserialize<'de> for PassportElementErrorTranslationFileBuilder
impl<'de> Deserialize<'de> for PassportElementErrorTranslationFileBuilder
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 Ord for PassportElementErrorTranslationFileBuilder
impl Ord for PassportElementErrorTranslationFileBuilder
Source§fn cmp(&self, other: &PassportElementErrorTranslationFileBuilder) -> Ordering
fn cmp(&self, other: &PassportElementErrorTranslationFileBuilder) -> 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 PassportElementErrorTranslationFileBuilder
impl PartialEq for PassportElementErrorTranslationFileBuilder
Source§fn eq(&self, other: &PassportElementErrorTranslationFileBuilder) -> bool
fn eq(&self, other: &PassportElementErrorTranslationFileBuilder) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for PassportElementErrorTranslationFileBuilder
impl PartialOrd for PassportElementErrorTranslationFileBuilder
impl Eq for PassportElementErrorTranslationFileBuilder
impl StructuralPartialEq for PassportElementErrorTranslationFileBuilder
Auto Trait Implementations§
impl Freeze for PassportElementErrorTranslationFileBuilder
impl RefUnwindSafe for PassportElementErrorTranslationFileBuilder
impl Send for PassportElementErrorTranslationFileBuilder
impl Sync for PassportElementErrorTranslationFileBuilder
impl Unpin for PassportElementErrorTranslationFileBuilder
impl UnwindSafe for PassportElementErrorTranslationFileBuilder
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§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.