Modules§
Structs§
- Amount
U128 - Checked
Coin - Denom
- Precise
- Rate
- A rate representing A / B.
Enums§
Traits§
- Denomination
- Marker trait for a Zero-Sized-Type representing a denomination.
You’ll likely want to implement this trait simply by declaring an empty struct,
and then using the
#[denom]attribute macro on it.monetary_macros::denom - Exchange
Functions§
- amount
- coin
- coins
- may_pay
- Similar to must_pay, but it any payment is optional. Returns an error if a different
denom was sent. Otherwise, returns the amount of
denomsent, or 0 if nothing sent. - must_
pay - Requires exactly one denom sent, which matches the requested denom. Returns the amount if only one denom and non-zero amount. Errors otherwise.
Attribute Macros§
- denom
- This macro: