Enum hmath::ConversionError
source · pub enum ConversionError {
NoData,
InvalidChar(char),
NotInRange {
permitted: String,
error: String,
},
UnexpectedEnd,
Infinity,
NegInfinity,
NotANumber,
TryFromIntError,
}
Variants§
NoData
InvalidChar(char)
NotInRange
UnexpectedEnd
Infinity
f32::INFINITY, f64::INFINITY
NegInfinity
f32::NEG_INFINITY, f64::NEG_INFINITY
NotANumber
f32::NAN, f64::NAN
TryFromIntError
std::num::TryFromIntError
is always converted to ConversionError::TryFromIntError
.
For example, if you try to convert a BigInt
into a u32
, it’s first converted to i64
, then to u32
.
If the latter one fails, Rust emits std::num::TryFromIntError
, which hmath cannot understand.
In this case hmath will throw this error.
Trait Implementations§
source§impl Clone for ConversionError
impl Clone for ConversionError
source§fn clone(&self) -> ConversionError
fn clone(&self) -> ConversionError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ConversionError
impl Debug for ConversionError
source§impl From<TryFromIntError> for ConversionError
impl From<TryFromIntError> for ConversionError
source§fn from(_: TryFromIntError) -> Self
fn from(_: TryFromIntError) -> Self
Converts to this type from the input type.
source§impl PartialEq<ConversionError> for ConversionError
impl PartialEq<ConversionError> for ConversionError
source§fn eq(&self, other: &ConversionError) -> bool
fn eq(&self, other: &ConversionError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ConversionError
Auto Trait Implementations§
impl RefUnwindSafe for ConversionError
impl Send for ConversionError
impl Sync for ConversionError
impl Unpin for ConversionError
impl UnwindSafe for ConversionError
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