paupino / rust-decimal

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

Implement traits on the ArchivedDecimal. #639

Open gz opened 7 months ago

gz commented 7 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 6 months ago

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