pub enum ErrorKind<E = String> {
External(ExternalError<E>),
Sync(SyncError),
}
Variants§
External(ExternalError<E>)
Sync(SyncError)
Implementations§
Source§impl<E> ErrorKind<E>
impl<E> ErrorKind<E>
Sourcepub const fn is_external(&self) -> bool
pub const fn is_external(&self) -> bool
Returns true if the enum is ErrorKind::External otherwise false
Trait Implementations§
Source§impl<'de, E> Deserialize<'de> for ErrorKind<E>where
E: Deserialize<'de>,
impl<'de, E> Deserialize<'de> for ErrorKind<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> Error for ErrorKind<E>where
E: Debug,
impl<E> Error for ErrorKind<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<'_enum, E> From<&'_enum ErrorKind<E>> for ErrorKindDiscriminants
impl<'_enum, E> From<&'_enum ErrorKind<E>> for ErrorKindDiscriminants
Source§fn from(val: &'_enum ErrorKind<E>) -> ErrorKindDiscriminants
fn from(val: &'_enum ErrorKind<E>) -> ErrorKindDiscriminants
Converts to this type from the input type.
Source§impl<E> From<ErrorKind<E>> for ErrorKindDiscriminants
impl<E> From<ErrorKind<E>> for ErrorKindDiscriminants
Source§fn from(val: ErrorKind<E>) -> ErrorKindDiscriminants
fn from(val: ErrorKind<E>) -> ErrorKindDiscriminants
Converts to this type from the input type.
Source§impl<E> IntoDiscriminant for ErrorKind<E>
impl<E> IntoDiscriminant for ErrorKind<E>
Source§type Discriminant = ErrorKindDiscriminants
type Discriminant = ErrorKindDiscriminants
Enum listing the same variants as this enum but without any data fields
fn discriminant(&self) -> Self::Discriminant
Source§impl<E> IntoEnumIterator for ErrorKind<E>
impl<E> IntoEnumIterator for ErrorKind<E>
type Iterator = ErrorKindIter<E>
fn iter() -> ErrorKindIter<E> ⓘ
Source§impl<E: Ord> Ord for ErrorKind<E>
impl<E: Ord> Ord for ErrorKind<E>
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: PartialOrd> PartialOrd for ErrorKind<E>
impl<E: PartialOrd> PartialOrd for ErrorKind<E>
Source§impl<E> VariantNames for ErrorKind<E>
impl<E> VariantNames for ErrorKind<E>
impl<E: Copy> Copy for ErrorKind<E>
impl<E: Eq> Eq for ErrorKind<E>
impl<E> StructuralPartialEq for ErrorKind<E>
Auto Trait Implementations§
impl<E> Freeze for ErrorKind<E>where
E: Freeze,
impl<E> RefUnwindSafe for ErrorKind<E>where
E: RefUnwindSafe,
impl<E> Send for ErrorKind<E>where
E: Send,
impl<E> Sync for ErrorKind<E>where
E: Sync,
impl<E> Unpin for ErrorKind<E>where
E: Unpin,
impl<E> UnwindSafe for ErrorKind<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