pub struct Posting<'a, A = Option<Amount<'a>>> { /* private fields */ }
Available on crate feature unstable only.
Expand description
A posting
It is the association of an Account and an Amount.
(though the amount is optional)
A posting may also have, price and cost defined after the amount.
Assets:A:B 10 CHF (most common form)
! Assets:A:B 10 CHF (with pending flag)
Assets:A:B 10 CHF @ 1 EUR (with price)
Assets:A:B 10 CHF {2 USD} (with cost)
Assets:A:B (without amount)
Returns the flag on this posting (if present)
Returns the account referenced by this posting
Returns the amount of the posting (if present)
Returns a tuple of price-type and the price (if a price was defined)
Returns the cost (if present)
Returns the comment (if present)
Performs copy-assignment from
source.
Read more
Formats the value using the given formatter.
Read more
This method tests for self and other values to be equal, and is used
by ==.
This method tests for !=. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.