Struct penny::Money
[−]
[src]
pub struct Money { /* fields omitted */ }
A bundle of an amount of money and the currency it's in.
Methods
impl Money
[src]
fn new(amount: i64, currency: Currency) -> Money
[src]
Creates a new Money
of the given amount and currency.
fn amount(&self) -> i64
[src]
Returns the contained amount of money.
fn currency(&self) -> Currency
[src]
Returns the type of currency.
fn currency_info(&self) -> &'static CurrencyInfo
[src]
Returns information about this money's currency.
Caches the reference to make future accesses quicker.