pub enum CustomError<E> {
Custom(E),
Error(Error),
}
Expand description
An error type returned when a custom error is available alongside an allocation error.
Variants§
Trait Implementations§
Source§impl<E: Debug> Debug for CustomError<E>
impl<E: Debug> Debug for CustomError<E>
Source§impl<E> From<AllocError> for CustomError<E>
impl<E> From<AllocError> for CustomError<E>
Source§fn from(error: AllocError) -> Self
fn from(error: AllocError) -> Self
Converts to this type from the input type.
Source§impl<E> From<CustomError<E>> for ErrorOrInsertSlot<E>
impl<E> From<CustomError<E>> for ErrorOrInsertSlot<E>
Source§fn from(error: CustomError<E>) -> Self
fn from(error: CustomError<E>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<E> Freeze for CustomError<E>where
E: Freeze,
impl<E> RefUnwindSafe for CustomError<E>where
E: RefUnwindSafe,
impl<E> Send for CustomError<E>where
E: Send,
impl<E> Sync for CustomError<E>where
E: Sync,
impl<E> Unpin for CustomError<E>where
E: Unpin,
impl<E> UnwindSafe for CustomError<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