Module serde

Source
Available on crate feature serde only.
Expand description

Additional functionality for serializing/deserializing DivInt structs with Serde.

By default, DivInt is serialized using its semantic value, i.e. as floating-point numbers. For example, a div_int!(35 / 20) is serialized as 1.75.

This serialization scheme is lossy. If you want precise behavior, you can serialize DivInt using the numerator only by configuring Serde using the as_numerator module.

Modulesยง

as_numerator
Custom Serde serializer/deserializer module that uses numerator as the serialized value.