Module num

Source

Enums§

NumberOrHexU64
An enum that represents either a serde_json::Number integer, or a hex [U64].
NumberOrHexU256
An enum that represents either a serde_json::Number integer, or a hex [U256].

Functions§

deserialize_u64_from_num_or_hex
from_int_or_hex_to_u64
Deserializes the input into a U64, accepting both 0x-prefixed hex and decimal strings with arbitrary precision, defined by serde_json’s Number.
from_int_or_hex_to_u64_opt
Deserializes the input into an Option<U64>, using from_int_or_hex_to_u64 to deserialize the inner value.
from_int_or_hex_to_u256
Deserializes the input into a U256, accepting both 0x-prefixed hex and decimal strings with arbitrary precision, defined by serde_json’s Number.
from_int_or_hex_to_u256_opt
Deserializes the input into an Option<U256>, using [from_int_or_hex] to deserialize the inner value.