Enum serde_utils::num::NumberOrHexU256
source · pub enum NumberOrHexU256 {
Int(Number),
Hex(U256),
}
Expand description
An enum that represents either a serde_json::Number integer, or a hex [U256].
Variants§
Implementations§
source§impl NumberOrHexU256
impl NumberOrHexU256
sourcepub fn try_into_u256<E: Error>(self) -> Result<U256, E>
pub fn try_into_u256<E: Error>(self) -> Result<U256, E>
Tries to convert this into a [U256]].
Trait Implementations§
source§impl Debug for NumberOrHexU256
impl Debug for NumberOrHexU256
source§impl<'de> Deserialize<'de> for NumberOrHexU256
impl<'de> Deserialize<'de> for NumberOrHexU256
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for NumberOrHexU256
impl Send for NumberOrHexU256
impl Sync for NumberOrHexU256
impl Unpin for NumberOrHexU256
impl UnwindSafe for NumberOrHexU256
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