pub enum ExternalError<E = String> {
Custom(E),
Unknown,
}
Variants§
Implementations§
Source§impl<E> ExternalError<E>
impl<E> ExternalError<E>
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<E: Clone> Clone for ExternalError<E>
impl<E: Clone> Clone for ExternalError<E>
Source§fn clone(&self) -> ExternalError<E>
fn clone(&self) -> ExternalError<E>
Returns a duplicate 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<E: Debug> Debug for ExternalError<E>
impl<E: Debug> Debug for ExternalError<E>
Source§impl<E> Default for ExternalError<E>
impl<E> Default for ExternalError<E>
Source§fn default() -> ExternalError<E>
fn default() -> ExternalError<E>
Returns the “default value” for a type. Read more
Source§impl<'de, E> Deserialize<'de> for ExternalError<E>where
E: Deserialize<'de>,
impl<'de, E> Deserialize<'de> for ExternalError<E>where
E: Deserialize<'de>,
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<E> Display for ExternalError<E>
impl<E> Display for ExternalError<E>
Source§impl<E> Error for ExternalError<E>where
E: Debug,
impl<E> Error for ExternalError<E>where
E: Debug,
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<E> ErrorType for ExternalError<E>where
E: ToString,
impl<E> ErrorType for ExternalError<E>where
E: ToString,
Source§impl<E: Hash> Hash for ExternalError<E>
impl<E: Hash> Hash for ExternalError<E>
Source§impl<E: Ord> Ord for ExternalError<E>
impl<E: Ord> Ord for ExternalError<E>
Source§fn cmp(&self, other: &ExternalError<E>) -> Ordering
fn cmp(&self, other: &ExternalError<E>) -> 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<E: PartialEq> PartialEq for ExternalError<E>
impl<E: PartialEq> PartialEq for ExternalError<E>
Source§impl<E: PartialOrd> PartialOrd for ExternalError<E>
impl<E: PartialOrd> PartialOrd for ExternalError<E>
Source§impl<E> Serialize for ExternalError<E>where
E: Serialize,
impl<E> Serialize for ExternalError<E>where
E: Serialize,
Source§impl<E> VariantNames for ExternalError<E>
impl<E> VariantNames for ExternalError<E>
impl<E: Copy> Copy for ExternalError<E>
impl<E: Eq> Eq for ExternalError<E>
impl<E> StructuralPartialEq for ExternalError<E>
Auto Trait Implementations§
impl<E> Freeze for ExternalError<E>where
E: Freeze,
impl<E> RefUnwindSafe for ExternalError<E>where
E: RefUnwindSafe,
impl<E> Send for ExternalError<E>where
E: Send,
impl<E> Sync for ExternalError<E>where
E: Sync,
impl<E> Unpin for ExternalError<E>where
E: Unpin,
impl<E> UnwindSafe for ExternalError<E>where
E: 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