pub enum NumericError {
Negative {
field: String,
value: i64,
},
Overflow {
field: String,
value: i64,
},
}Expand description
Error converting an i64 to a u32.
If we expect a numeric value to sanely fit inside a u32 we use that type in the model
module, this requires converting the i64 returned by the JSONRPC API into a u32, if our
expectations are not met this error will be encountered.
Variants§
Negative
Expected an unsigned numeric value however the value was negative.
Overflow
A value larger than u32::MAX was unexpectedly encountered.
Trait Implementations§
Source§impl Debug for NumericError
impl Debug for NumericError
Source§impl Display for NumericError
impl Display for NumericError
Source§impl Error for NumericError
impl Error for NumericError
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 From<NumericError> for GetBlockchainInfoError
impl From<NumericError> for GetBlockchainInfoError
Source§fn from(e: NumericError) -> Self
fn from(e: NumericError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NumericError
impl RefUnwindSafe for NumericError
impl Send for NumericError
impl Sync for NumericError
impl Unpin for NumericError
impl UnwindSafe for NumericError
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