paupino / rust-decimal

Decimal number implementation written in pure Rust suitable for financial and fixed-precision calculations.
https://docs.rs/rust_decimal/
MIT License
1.03k stars 183 forks source link

Implement traits on the ArchivedDecimal. #639

Closed gz closed 1 month ago

gz commented 10 months ago

rkyv generates a separate type ArchivedDecimal, which represents the serialized value. In this PR we implement several traits to allow for ordering and equality on the ArchivedDecimal type (according to the rules of the Decimal type).

We also implement comparison between Decimal and ArchivedDecimal (PartialOrd) which is helpful to efficiently compare e.g., a more complex in-memory type that uses decimal as part of its fields with the serialized counter-part.

gz commented 9 months ago

hi, is there anything I can do to move this PR forward?

Tony-Samuels commented 1 month ago

Closing as we're going to be stuck on 0.7 to avoid breaking changes (see #682), and we'll be pushing users to use the remote derive feature, where they can add the traits they need (see #683).