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 for CustomError<E>where
E: Debug,
impl<E> Debug for CustomError<E>where
E: Debug,
Source§impl<E> From<AllocError> for CustomError<E>
impl<E> From<AllocError> for CustomError<E>
Source§fn from(error: AllocError) -> CustomError<E>
fn from(error: AllocError) -> CustomError<E>
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>) -> ErrorOrInsertSlot<E>
fn from(error: CustomError<E>) -> ErrorOrInsertSlot<E>
Converts to this type from the input type.
Source§impl<E> From<CustomError<E>> for VmError
impl<E> From<CustomError<E>> for VmError
Source§fn from(error: CustomError<E>) -> Self
fn from(error: CustomError<E>) -> Self
Converts to this type from the input type.
Source§impl<E> From<Error> for CustomError<E>
impl<E> From<Error> for CustomError<E>
Source§fn from(error: Error) -> CustomError<E>
fn from(error: Error) -> CustomError<E>
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