serde_this_or_thatFunction as_u64
Source pub fn as_u64<'de, D>(deserializer: D) -> Result<u64, D::Error>
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.