pub enum PassportElementErrorSource {
    DataField(PassportElementErrorSourceDataField),
    File(PassportElementErrorSourceFile),
    Files(PassportElementErrorSourceFiles),
    FrontSide(PassportElementErrorSourceFrontSide),
    ReverseSide(PassportElementErrorSourceReverseSide),
    Selfie(PassportElementErrorSourceSelfie),
    TranslationFile(PassportElementErrorSourceTranslationFile),
    TranslationFiles(PassportElementErrorSourceTranslationFiles),
    Unspecified(PassportElementErrorSourceUnspecified),
    // some variants omitted
}Expand description
Contains the description of an error in a Telegram Passport element
Variants§
DataField(PassportElementErrorSourceDataField)
One of the data fields contains an error. The error will be considered resolved when the value of the field changes
File(PassportElementErrorSourceFile)
The file contains an error. The error will be considered resolved when the file changes
Files(PassportElementErrorSourceFiles)
The list of attached files contains an error. The error will be considered resolved when the list of files changes
FrontSide(PassportElementErrorSourceFrontSide)
The front side of the document contains an error. The error will be considered resolved when the file with the front side changes
ReverseSide(PassportElementErrorSourceReverseSide)
The reverse side of the document contains an error. The error will be considered resolved when the file with the reverse side changes
Selfie(PassportElementErrorSourceSelfie)
The selfie with the document contains an error. The error will be considered resolved when the file with the selfie changes
TranslationFile(PassportElementErrorSourceTranslationFile)
One of files with the translation of the document contains an error. The error will be considered resolved when the file changes
TranslationFiles(PassportElementErrorSourceTranslationFiles)
The translation of the document contains an error. The error will be considered resolved when the list of translation files changes
Unspecified(PassportElementErrorSourceUnspecified)
The element contains an error in an unspecified place. The error will be considered resolved when new data is added
Implementations§
Source§impl PassportElementErrorSource
 
impl PassportElementErrorSource
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>
pub fn is_data_field(&self) -> bool
pub fn is_file(&self) -> bool
pub fn is_files(&self) -> bool
pub fn is_front_side(&self) -> bool
pub fn is_reverse_side(&self) -> bool
pub fn is_selfie(&self) -> bool
pub fn is_translation_file(&self) -> bool
pub fn is_translation_files(&self) -> bool
pub fn is_unspecified(&self) -> bool
pub fn on_data_field<F: FnOnce(&PassportElementErrorSourceDataField)>( &self, fnc: F, ) -> &Self
pub fn on_file<F: FnOnce(&PassportElementErrorSourceFile)>( &self, fnc: F, ) -> &Self
pub fn on_files<F: FnOnce(&PassportElementErrorSourceFiles)>( &self, fnc: F, ) -> &Self
pub fn on_front_side<F: FnOnce(&PassportElementErrorSourceFrontSide)>( &self, fnc: F, ) -> &Self
pub fn on_reverse_side<F: FnOnce(&PassportElementErrorSourceReverseSide)>( &self, fnc: F, ) -> &Self
pub fn on_selfie<F: FnOnce(&PassportElementErrorSourceSelfie)>( &self, fnc: F, ) -> &Self
pub fn on_translation_file<F: FnOnce(&PassportElementErrorSourceTranslationFile)>( &self, fnc: F, ) -> &Self
pub fn on_translation_files<F: FnOnce(&PassportElementErrorSourceTranslationFiles)>( &self, fnc: F, ) -> &Self
pub fn on_unspecified<F: FnOnce(&PassportElementErrorSourceUnspecified)>( &self, fnc: F, ) -> &Self
pub fn as_data_field(&self) -> Option<&PassportElementErrorSourceDataField>
pub fn as_file(&self) -> Option<&PassportElementErrorSourceFile>
pub fn as_files(&self) -> Option<&PassportElementErrorSourceFiles>
pub fn as_front_side(&self) -> Option<&PassportElementErrorSourceFrontSide>
pub fn as_reverse_side(&self) -> Option<&PassportElementErrorSourceReverseSide>
pub fn as_selfie(&self) -> Option<&PassportElementErrorSourceSelfie>
pub fn as_translation_file( &self, ) -> Option<&PassportElementErrorSourceTranslationFile>
pub fn as_translation_files( &self, ) -> Option<&PassportElementErrorSourceTranslationFiles>
pub fn as_unspecified(&self) -> Option<&PassportElementErrorSourceUnspecified>
pub fn data_field<T: AsRef<PassportElementErrorSourceDataField>>(t: T) -> Self
pub fn file<T: AsRef<PassportElementErrorSourceFile>>(t: T) -> Self
pub fn files<T: AsRef<PassportElementErrorSourceFiles>>(t: T) -> Self
pub fn front_side<T: AsRef<PassportElementErrorSourceFrontSide>>(t: T) -> Self
pub fn reverse_side<T: AsRef<PassportElementErrorSourceReverseSide>>( t: T, ) -> Self
pub fn selfie<T: AsRef<PassportElementErrorSourceSelfie>>(t: T) -> Self
pub fn translation_file<T: AsRef<PassportElementErrorSourceTranslationFile>>( t: T, ) -> Self
pub fn translation_files<T: AsRef<PassportElementErrorSourceTranslationFiles>>( t: T, ) -> Self
pub fn unspecified<T: AsRef<PassportElementErrorSourceUnspecified>>( t: T, ) -> Self
Trait Implementations§
Source§impl AsRef<PassportElementErrorSource> for PassportElementErrorSource
 
impl AsRef<PassportElementErrorSource> for PassportElementErrorSource
Source§fn as_ref(&self) -> &PassportElementErrorSource
 
fn as_ref(&self) -> &PassportElementErrorSource
Source§impl Clone for PassportElementErrorSource
 
impl Clone for PassportElementErrorSource
Source§fn clone(&self) -> PassportElementErrorSource
 
fn clone(&self) -> PassportElementErrorSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read more