pub enum ToUintError<T> {
ValueTooLarge(usize, T),
ValueNegative(usize, T),
NotANumber(usize),
}
Expand description
Error for TryFrom<T>
for Uint
.
Variants§
ValueTooLarge(usize, T)
Value is too large to fit the Uint.
.0
is BITS
and .1
is the wrapped value.
ValueNegative(usize, T)
Negative values can not be represented as Uint.
.0
is BITS
and .1
is the wrapped value.
NotANumber(usize)
‘Not a number’ (NaN) can not be represented as Uint
Trait Implementations§
Source§impl<T: Clone> Clone for ToUintError<T>
impl<T: Clone> Clone for ToUintError<T>
Source§fn clone(&self) -> ToUintError<T>
fn clone(&self) -> ToUintError<T>
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<T: Debug> Debug for ToUintError<T>
impl<T: Debug> Debug for ToUintError<T>
Source§impl<T> Display for ToUintError<T>
impl<T> Display for ToUintError<T>
Source§impl<T: Debug> Error for ToUintError<T>
impl<T: Debug> Error for ToUintError<T>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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<T: Hash> Hash for ToUintError<T>
impl<T: Hash> Hash for ToUintError<T>
Source§impl<T: PartialEq> PartialEq for ToUintError<T>
impl<T: PartialEq> PartialEq for ToUintError<T>
impl<T: Copy> Copy for ToUintError<T>
impl<T: Eq> Eq for ToUintError<T>
impl<T> StructuralPartialEq for ToUintError<T>
Auto Trait Implementations§
impl<T> Freeze for ToUintError<T>where
T: Freeze,
impl<T> RefUnwindSafe for ToUintError<T>where
T: RefUnwindSafe,
impl<T> Send for ToUintError<T>where
T: Send,
impl<T> Sync for ToUintError<T>where
T: Sync,
impl<T> Unpin for ToUintError<T>where
T: Unpin,
impl<T> UnwindSafe for ToUintError<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