#[non_exhaustive]pub enum Error<O: Copy + Debug> {
FromNone,
Other(O),
}Expand description
RRTK follows the enum style of error handling. This is the error type returned from nearly all
RRTK types, but you can add your own custom error type using Other(O). It is strongly
recommended that you use a single O type across your crate.
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.
FromNone
Returned when a None is elevated to an error by a
NoneToError.
Other(O)
A custom error of a user-defined type. Not created by any RRTK type but can be propagated by them.
Trait Implementations§
impl<O: Copy + Copy + Debug> Copy for Error<O>
impl<O: Copy + Debug> StructuralPartialEq for Error<O>
Auto Trait Implementations§
impl<O> Freeze for Error<O>where
O: Freeze,
impl<O> RefUnwindSafe for Error<O>where
O: RefUnwindSafe,
impl<O> Send for Error<O>where
O: Send,
impl<O> Sync for Error<O>where
O: Sync,
impl<O> Unpin for Error<O>where
O: Unpin,
impl<O> UnwindSafe for Error<O>where
O: 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