lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

pricing.rs (472B)


      1 //! Deterministic quantity pricing, discounts, and checked cost operations.
      2 //!
      3 //! Import [`QuantityPriceOps`] to calculate costs. Its `try_*` methods reject
      4 //! invalid prices, negative quantities, unit mismatches, and arithmetic
      5 //! overflow without producing a partial result.
      6 
      7 pub use crate::discount::{
      8     Discount, DiscountScope, DiscountThreshold, DiscountValue, Error as DiscountError,
      9 };
     10 pub use crate::quantity_price::{Error, QuantityPrice, QuantityPriceOps};