[−][src]Enum tbot::types::passport::element::error::Source
Reperesents possible sources of an error.
Variants (Non-exhaustive)
Data(Data<'a>)
An error with data.
FrontSide(FrontSide<'a>)
An error with a front side.
ReverseSide(ReverseSide<'a>)
An error with a reverse side.
Selfie(Selfie<'a>)
An error with a selfie.
File(File<'a>)
An error with a file.
Files(Files<'a>)
An error with several files.
TranslationFile(TranslationFile<'a>)
An error with a translation file.
TranslationFiles(TranslationFiles<'a>)
An error with translation files.
Unspecified(Unspecified<'a>)
An unspecified error.
Implementations
impl<'a> Source<'a>
[src]
pub fn is_data(&self) -> bool
[src]
Returns true
if self
is of variant Data
.
pub fn expect_data(self) -> Data<'a> where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Data
.
Panics
Panics if the value is not Data
, with a panic message including the content of self
.
pub fn data(self) -> Option<Data<'a>>
[src]
Returns Some
if self
is of variant Data
, and None
otherwise.
pub fn is_front_side(&self) -> bool
[src]
Returns true
if self
is of variant FrontSide
.
pub fn expect_front_side(self) -> FrontSide<'a> where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of FrontSide
.
Panics
Panics if the value is not FrontSide
, with a panic message including the content of self
.
pub fn front_side(self) -> Option<FrontSide<'a>>
[src]
Returns Some
if self
is of variant FrontSide
, and None
otherwise.
pub fn is_reverse_side(&self) -> bool
[src]
Returns true
if self
is of variant ReverseSide
.
pub fn expect_reverse_side(self) -> ReverseSide<'a> where
Self: Debug,
[src]
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
.
pub fn reverse_side(self) -> Option<ReverseSide<'a>>
[src]
Returns Some
if self
is of variant ReverseSide
, and None
otherwise.
pub fn is_selfie(&self) -> bool
[src]
Returns true
if self
is of variant Selfie
.
pub fn expect_selfie(self) -> Selfie<'a> where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Selfie
.
Panics
Panics if the value is not Selfie
, with a panic message including the content of self
.
pub fn selfie(self) -> Option<Selfie<'a>>
[src]
Returns Some
if self
is of variant Selfie
, and None
otherwise.
pub fn is_file(&self) -> bool
[src]
Returns true
if self
is of variant File
.
pub fn expect_file(self) -> File<'a> where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of File
.
Panics
Panics if the value is not File
, with a panic message including the content of self
.
pub fn file(self) -> Option<File<'a>>
[src]
Returns Some
if self
is of variant File
, and None
otherwise.
pub fn is_files(&self) -> bool
[src]
Returns true
if self
is of variant Files
.
pub fn expect_files(self) -> Files<'a> where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Files
.
Panics
Panics if the value is not Files
, with a panic message including the content of self
.
pub fn files(self) -> Option<Files<'a>>
[src]
Returns Some
if self
is of variant Files
, and None
otherwise.
pub fn is_translation_file(&self) -> bool
[src]
Returns true
if self
is of variant TranslationFile
.
pub fn expect_translation_file(self) -> TranslationFile<'a> where
Self: Debug,
[src]
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
.
pub fn translation_file(self) -> Option<TranslationFile<'a>>
[src]
Returns Some
if self
is of variant TranslationFile
, and None
otherwise.
pub fn is_translation_files(&self) -> bool
[src]
Returns true
if self
is of variant TranslationFiles
.
pub fn expect_translation_files(self) -> TranslationFiles<'a> where
Self: Debug,
[src]
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
.
pub fn translation_files(self) -> Option<TranslationFiles<'a>>
[src]
Returns Some
if self
is of variant TranslationFiles
, and None
otherwise.
pub fn is_unspecified(&self) -> bool
[src]
Returns true
if self
is of variant Unspecified
.
pub fn expect_unspecified(self) -> Unspecified<'a> where
Self: Debug,
[src]
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
.
pub fn unspecified(self) -> Option<Unspecified<'a>>
[src]
Returns Some
if self
is of variant Unspecified
, and None
otherwise.
Trait Implementations
impl<'a> Clone for Source<'a>
[src]
impl<'a> Copy for Source<'a>
[src]
impl<'a> Debug for Source<'a>
[src]
impl<'a> Eq for Source<'a>
[src]
impl<'a> From<Data<'a>> for Source<'a>
[src]
impl<'a> From<File<'a>> for Source<'a>
[src]
impl<'a> From<Files<'a>> for Source<'a>
[src]
impl<'a> From<FrontSide<'a>> for Source<'a>
[src]
impl<'a> From<ReverseSide<'a>> for Source<'a>
[src]
fn from(source: ReverseSide<'a>) -> Self
[src]
impl<'a> From<Selfie<'a>> for Source<'a>
[src]
impl<'a> From<TranslationFile<'a>> for Source<'a>
[src]
fn from(source: TranslationFile<'a>) -> Self
[src]
impl<'a> From<TranslationFiles<'a>> for Source<'a>
[src]
fn from(source: TranslationFiles<'a>) -> Self
[src]
impl<'a> From<Unspecified<'a>> for Source<'a>
[src]
fn from(source: Unspecified<'a>) -> Self
[src]
impl<'a> Hash for Source<'a>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> PartialEq<Source<'a>> for Source<'a>
[src]
impl<'a> Serialize for Source<'a>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'a> StructuralEq for Source<'a>
[src]
impl<'a> StructuralPartialEq for Source<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Source<'a>
impl<'a> Send for Source<'a>
impl<'a> Sync for Source<'a>
impl<'a> Unpin for Source<'a>
impl<'a> UnwindSafe for Source<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,