pub fn deserialize_as_i64_or_none<'de, D>(
deserializer: D,
) -> Result<Option<i64>, D::Error>where
D: Deserializer<'de>,
Expand description
A helper function to deserialize cell values as i64
,
useful when cells may also contain invalid values (i.e. strings).
It applies the [as_i64
] method to the cell value, and returns
Ok(Some(value_as_i64))
if successful or Ok(None)
if unsuccessful,
therefore never failing. This function is intended to be used with Serde’s
deserialize_with
field attribute.