serde_this_or_thatFunction as_i64
Source pub fn as_i64<'de, D>(deserializer: D) -> Result<i64, D::Error>
Expand description
De-serialize either a null
, str
, i64
, f64
, or u64
as a signed value.
§Errors
Returns an error if a string is non-empty and not a valid numeric
value, or if the unsigned value u64
overflows when converted
to i64
.
§Returns
The signed (i64
) value of a string or number.