Enum typed_floats::InvalidNumber
source · pub enum InvalidNumber {
NaN,
Zero,
Negative,
Positive,
Infinite,
}
Expand description
An error that can occur when converting into a typed float
Variants§
NaN
Any variant of Nan
Zero
+0.0
or -0.0
Negative
Any negative number, including -0.0
and -inf
Positive
Any positive number, including +0.0
and +inf
Infinite
+inf
or -inf
Trait Implementations§
source§impl Debug for InvalidNumber
impl Debug for InvalidNumber
source§impl Display for InvalidNumber
impl Display for InvalidNumber
source§impl Error for InvalidNumber
impl Error for InvalidNumber
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 PartialEq for InvalidNumber
impl PartialEq for InvalidNumber
source§fn eq(&self, other: &InvalidNumber) -> bool
fn eq(&self, other: &InvalidNumber) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for InvalidNumber
impl StructuralPartialEq for InvalidNumber
Auto Trait Implementations§
impl Freeze for InvalidNumber
impl RefUnwindSafe for InvalidNumber
impl Send for InvalidNumber
impl Sync for InvalidNumber
impl Unpin for InvalidNumber
impl UnwindSafe for InvalidNumber
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