Function serde_this_or_that::as_u64

source ·
pub fn as_u64<'de, D>(deserializer: D) -> Result<u64, D::Error>where
D: Deserializer<'de>,
Expand description

De-serialize either a null, str, u64, f64, or i64 as an unsigned value.

Errors

Returns an error if a string is non-empty and not a valid numeric value, or if the signed value i64 represents a negative number.

Returns

The unsigned (u64) value of a string or number.