Skip to main content

Module money

Module money 

Expand description

Currency and currency-tagged money.

Money carries a passive f64 amount tagged with a Currency. It is a currency-tagged quantity, not a pricing result: nothing in the pricing surface returns one, and no Money amount is ever a differentiable market input. Same-currency arithmetic is supported directly; cross-currency conversion goes through an FxRates.

Structs§

Currency
An ISO 4217 currency code (three uppercase ASCII letters).
Money
A currency-tagged amount.

Enums§

MinorCurrency
A minor-unit quote currency: a vendor code quoting prices in a fraction of a major Currency (pence, cents, agorot).
MoneyError
Error on a money operation.

Constants§

CURRENCY_FORM 🔒
The shape a currency code must have, named on rejection.