pub enum NumberCastCause {
Infinite,
NAN,
Overflow,
Underflow,
}Expand description
A type of the RuntimeError::NumberCast error.
This object describes the reason why the source numeric value cannot be converted into the destination numeric value.
Variants§
Infinite
The target type does not support representation of infinite numbers.
NAN
The target type does not support representation of NaN numbers.
Overflow
The source numeric value is too large for the range of the target type.
Underflow
The source numeric value is too small for the range of the target type.
Trait Implementations§
Source§impl Clone for NumberCastCause
impl Clone for NumberCastCause
Source§fn clone(&self) -> NumberCastCause
fn clone(&self) -> NumberCastCause
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NumberCastCause
Source§impl Debug for NumberCastCause
impl Debug for NumberCastCause
impl Eq for NumberCastCause
Source§impl PartialEq for NumberCastCause
impl PartialEq for NumberCastCause
Source§fn eq(&self, other: &NumberCastCause) -> bool
fn eq(&self, other: &NumberCastCause) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NumberCastCause
Auto Trait Implementations§
impl Freeze for NumberCastCause
impl RefUnwindSafe for NumberCastCause
impl Send for NumberCastCause
impl Sync for NumberCastCause
impl Unpin for NumberCastCause
impl UnsafeUnpin for NumberCastCause
impl UnwindSafe for NumberCastCause
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