Skip to main content

deserialize_decimal_token_borrowed

Function deserialize_decimal_token_borrowed 

Source
pub fn deserialize_decimal_token_borrowed<'de, D>(
    deserializer: D,
) -> Result<Decimal, D::Error>
where D: Deserializer<'de>,
Expand description

Deserializes a Decimal as deserialize_decimal_token does, borrowing the token from the input instead of copying it.

Requires a deserializer that borrows from its input, such as serde_json::from_str or serde_json::from_slice. Use deserialize_decimal_token for serde_json::from_reader and serde_json::Value input.

ยงErrors

Returns an error if the deserializer cannot lend the token, or for any token that deserialize_decimal_token rejects.