Function serde_this_or_that::as_i64

source ·
pub fn as_i64<'de, D>(deserializer: D) -> Result<i64, D::Error>where
D: Deserializer<'de>,
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.