pub fn deserialize_optional_decimal_from_str<'de, D>(
deserializer: D,
) -> Result<Option<Decimal>, D::Error>where
D: Deserializer<'de>,Expand description
Deserializes an optional Decimal from a string-only field.
Returns None if the value is null or the string is empty, otherwise
parses to Decimal.
ยงErrors
Returns an error if the string cannot be parsed as a valid decimal.