#[non_exhaustive]pub enum Error<T> {
NoZeroSymbol,
OutOfMemory(T),
OutOfBounds(T),
}
Expand description
Error types that can arise from formatting nominals in this 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.
NoZeroSymbol
A formatting request for index 0
was made against a nominal system
that has no zero symbol.
OutOfMemory(T)
This nominal can’t be formatted with the available memory.
OutOfBounds(T)
This number cannot be represented by the nominal system.
Implementations§
source§impl<T> Error<T>where
T: Nominal,
impl<T> Error<T>where
T: Nominal,
sourcepub fn into_decimal(self) -> NominalString
pub fn into_decimal(self) -> NominalString
Converts this error to a nominal string in decimal form.
Error::NoZeroSymbol
is returned as 0Error::OutOfBounds
andError::OutOfMemory
will format the erroring nominal inDecimal
.
Trait Implementations§
source§impl<T: PartialEq> PartialEq for Error<T>
impl<T: PartialEq> PartialEq for Error<T>
impl<T: Copy> Copy for Error<T>
impl<T: Eq> Eq for Error<T>
impl<T> StructuralEq for Error<T>
impl<T> StructuralPartialEq for Error<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Error<T>where
T: RefUnwindSafe,
impl<T> Send for Error<T>where
T: Send,
impl<T> Sync for Error<T>where
T: Sync,
impl<T> Unpin for Error<T>where
T: Unpin,
impl<T> UnwindSafe for Error<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