Function serde_this_or_that::as_f64

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

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

Errors

Returns an error if a string is non-empty and not a valid numeric value.

Returns

The floating point (f64) value of a string or number.