pub enum Error {
StringReprContainedNul,
ReadStringTruncated,
RemainderOutsideBounds,
ConversionOutsideRange,
IntParseFailed,
NoErrorPossible,
UnknownRoundingMode,
IMath {
code: mp_result,
msg: Option<&'static str>,
},
NotCanonicalInteger,
}
Expand description
Error used in reckoner
, usually originating from creachadair-imath-sys
.
Variants§
StringReprContainedNul
When converting from a string representation, the given string contained a zero-byte that was not at the end.
ReadStringTruncated
An error occurred when converting a string to a value, and the output was truncated.
RemainderOutsideBounds
The result of a remainder operation was outside the expected bounds.
ConversionOutsideRange
Could not convert a value to a primitive integer type because it was outside the range.
IntParseFailed
Integer parse failed.
NoErrorPossible
It impossible for this error to occur.
UnknownRoundingMode
Unknown value for an imath rounding mode.
IMath
Fields
Internal error from creachadair_imath_sys
.
NotCanonicalInteger
The rational value is not a canonical integer, in the form n/1
.
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<Infallible> for Error
impl From<Infallible> for Error
source§fn from(_src: Infallible) -> Self
fn from(_src: Infallible) -> Self
Converts to this type from the input type.
source§impl From<ParseIntError> for Error
impl From<ParseIntError> for Error
source§fn from(_src: ParseIntError) -> Self
fn from(_src: ParseIntError) -> Self
Converts to this type from the input type.
source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
source§fn from(_src: TryFromIntError) -> Self
fn from(_src: TryFromIntError) -> Self
Converts to this type from the input type.
source§impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
impl Eq for Error
impl StructuralEq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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