#[non_exhaustive]pub enum ExternalError<T = String> {
Custom(T),
Unknown,
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl<T> ExternalError<T>
impl<T> ExternalError<T>
Sourcepub const fn is_custom(&self) -> bool
pub const fn is_custom(&self) -> bool
Returns true if the enum is ExternalError::Custom otherwise false
Sourcepub const fn is_unknown(&self) -> bool
pub const fn is_unknown(&self) -> bool
Returns true if the enum is ExternalError::Unknown otherwise false
Trait Implementations§
Source§impl<T> AsRef<str> for ExternalError<T>
impl<T> AsRef<str> for ExternalError<T>
Source§impl<T: Clone> Clone for ExternalError<T>
impl<T: Clone> Clone for ExternalError<T>
Source§fn clone(&self) -> ExternalError<T>
fn clone(&self) -> ExternalError<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for ExternalError<T>
impl<T: Debug> Debug for ExternalError<T>
Source§impl<T> Default for ExternalError<T>
impl<T> Default for ExternalError<T>
Source§impl<T> Display for ExternalError<T>
impl<T> Display for ExternalError<T>
Source§impl From<ExternalError> for Errors
impl From<ExternalError> for Errors
Source§fn from(kind: ExternalError) -> Self
fn from(kind: ExternalError) -> Self
Converts to this type from the input type.
Source§impl<T: Hash> Hash for ExternalError<T>
impl<T: Hash> Hash for ExternalError<T>
Source§impl<T: Ord> Ord for ExternalError<T>
impl<T: Ord> Ord for ExternalError<T>
Source§fn cmp(&self, other: &ExternalError<T>) -> Ordering
fn cmp(&self, other: &ExternalError<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialEq> PartialEq for ExternalError<T>
impl<T: PartialEq> PartialEq for ExternalError<T>
Source§impl<T: PartialOrd> PartialOrd for ExternalError<T>
impl<T: PartialOrd> PartialOrd for ExternalError<T>
Source§impl<T> VariantNames for ExternalError<T>
impl<T> VariantNames for ExternalError<T>
impl<T: Copy> Copy for ExternalError<T>
impl<T: Eq> Eq for ExternalError<T>
impl<T> StructuralPartialEq for ExternalError<T>
Auto Trait Implementations§
impl<T> Freeze for ExternalError<T>where
T: Freeze,
impl<T> RefUnwindSafe for ExternalError<T>where
T: RefUnwindSafe,
impl<T> Send for ExternalError<T>where
T: Send,
impl<T> Sync for ExternalError<T>where
T: Sync,
impl<T> Unpin for ExternalError<T>where
T: Unpin,
impl<T> UnwindSafe for ExternalError<T>where
T: UnwindSafe,
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
Mutably borrows from an owned value. Read more