#[non_exhaustive]
pub enum Source {
Data(Data),
FrontSide(FrontSide),
ReverseSide(ReverseSide),
Selfie(Selfie),
File(File),
Files(Files),
TranslationFile(TranslationFile),
TranslationFiles(TranslationFiles),
Unspecified(Unspecified),
}Expand description
Reperesents possible sources of an error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Data(Data)
An error with data.
FrontSide(FrontSide)
An error with a front side.
ReverseSide(ReverseSide)
An error with a reverse side.
Selfie(Selfie)
An error with a selfie.
File(File)
An error with a file.
Files(Files)
An error with several files.
TranslationFile(TranslationFile)
An error with a translation file.
TranslationFiles(TranslationFiles)
An error with translation files.
Unspecified(Unspecified)
An unspecified error.
Implementations§
source§impl Source
impl Source
sourcepub fn expect_data(self) -> Datawhere
Self: Debug,
pub fn expect_data(self) -> Datawhere
Self: Debug,
sourcepub fn is_front_side(&self) -> bool
pub fn is_front_side(&self) -> bool
Returns true if self is of variant FrontSide.
sourcepub fn expect_front_side(self) -> FrontSidewhere
Self: Debug,
pub fn expect_front_side(self) -> FrontSidewhere
Self: Debug,
sourcepub fn front_side(self) -> Option<FrontSide>
pub fn front_side(self) -> Option<FrontSide>
Returns Some if self is of variant FrontSide, and None otherwise.
sourcepub fn is_reverse_side(&self) -> bool
pub fn is_reverse_side(&self) -> bool
Returns true if self is of variant ReverseSide.
sourcepub fn expect_reverse_side(self) -> ReverseSidewhere
Self: Debug,
pub fn expect_reverse_side(self) -> ReverseSidewhere
Self: Debug,
Unwraps the value, yielding the content of ReverseSide.
Panics
Panics if the value is not ReverseSide, with a panic message including the content of self.
sourcepub fn reverse_side(self) -> Option<ReverseSide>
pub fn reverse_side(self) -> Option<ReverseSide>
Returns Some if self is of variant ReverseSide, and None otherwise.
sourcepub fn expect_selfie(self) -> Selfiewhere
Self: Debug,
pub fn expect_selfie(self) -> Selfiewhere
Self: Debug,
sourcepub fn selfie(self) -> Option<Selfie>
pub fn selfie(self) -> Option<Selfie>
Returns Some if self is of variant Selfie, and None otherwise.
sourcepub fn expect_file(self) -> Filewhere
Self: Debug,
pub fn expect_file(self) -> Filewhere
Self: Debug,
sourcepub fn expect_files(self) -> Fileswhere
Self: Debug,
pub fn expect_files(self) -> Fileswhere
Self: Debug,
sourcepub fn files(self) -> Option<Files>
pub fn files(self) -> Option<Files>
Returns Some if self is of variant Files, and None otherwise.
sourcepub fn is_translation_file(&self) -> bool
pub fn is_translation_file(&self) -> bool
Returns true if self is of variant TranslationFile.
sourcepub fn expect_translation_file(self) -> TranslationFilewhere
Self: Debug,
pub fn expect_translation_file(self) -> TranslationFilewhere
Self: Debug,
Unwraps the value, yielding the content of TranslationFile.
Panics
Panics if the value is not TranslationFile, with a panic message including the content of self.
sourcepub fn translation_file(self) -> Option<TranslationFile>
pub fn translation_file(self) -> Option<TranslationFile>
Returns Some if self is of variant TranslationFile, and None otherwise.
sourcepub fn is_translation_files(&self) -> bool
pub fn is_translation_files(&self) -> bool
Returns true if self is of variant TranslationFiles.
sourcepub fn expect_translation_files(self) -> TranslationFileswhere
Self: Debug,
pub fn expect_translation_files(self) -> TranslationFileswhere
Self: Debug,
Unwraps the value, yielding the content of TranslationFiles.
Panics
Panics if the value is not TranslationFiles, with a panic message including the content of self.
sourcepub fn translation_files(self) -> Option<TranslationFiles>
pub fn translation_files(self) -> Option<TranslationFiles>
Returns Some if self is of variant TranslationFiles, and None otherwise.
sourcepub fn is_unspecified(&self) -> bool
pub fn is_unspecified(&self) -> bool
Returns true if self is of variant Unspecified.
sourcepub fn expect_unspecified(self) -> Unspecifiedwhere
Self: Debug,
pub fn expect_unspecified(self) -> Unspecifiedwhere
Self: Debug,
Unwraps the value, yielding the content of Unspecified.
Panics
Panics if the value is not Unspecified, with a panic message including the content of self.
sourcepub fn unspecified(self) -> Option<Unspecified>
pub fn unspecified(self) -> Option<Unspecified>
Returns Some if self is of variant Unspecified, and None otherwise.