Module rust_decimal::serde

source ·
Available on crate feature serde and (crate features serde-with-str or serde-with-float or serde-with-arbitrary-precision) only.
Expand description

Serde specific functionality to customize how a decimal is serialized/deserialized (serde_with)

Modules§

  • arbitrary_precisionserde-with-arbitrary-precision
    Serialize/deserialize Decimals as arbitrary precision numbers in JSON using the arbitrary_precision feature within serde_json.
  • arbitrary_precision_optionserde-with-arbitrary-precision
    Serialize/deserialize optional Decimals as arbitrary precision numbers in JSON using the arbitrary_precision feature within serde_json.
  • floatserde-with-float
    Serialize/deserialize Decimals as floats.
  • float_optionserde-with-float
    Serialize/deserialize optional Decimals as floats.
  • strserde-with-str
    Serialize/deserialize Decimals as strings. This is particularly useful when using binary encoding formats.
  • str_optionserde-with-str
    Serialize/deserialize optional Decimals as strings. This is particularly useful when using binary encoding formats.

Structs§