Enum ruint::ToUintError
source · 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>
Available on crate feature std only.
impl<T: Debug> Error for ToUintError<T>
Available on crate feature
std only.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<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>
source§fn eq(&self, other: &ToUintError<T>) -> bool
fn eq(&self, other: &ToUintError<T>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl<T: Copy> Copy for ToUintError<T>
impl<T: Eq> Eq for ToUintError<T>
impl<T> StructuralEq for ToUintError<T>
impl<T> StructuralPartialEq for ToUintError<T>
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.