Function deserialize_opt_hex_u256

Source
pub fn deserialize_opt_hex_u256<'de, D>(
    deserializer: D,
) -> Result<Option<U256>, D::Error>
where D: Deserializer<'de>,
Expand description

Custom deserializer that converts an optional hexadecimal string into an Option<U256>. A None result indicates the field was absent or explicitly null.

§Errors

Returns a serde::de::Error if the string is not valid hex or cannot be parsed into U256.