Enum scsys_core::errors::ExternalError
source · #[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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)