pub enum Entry {
Open(Open),
Close(Close),
Commodity(Commodity),
Payee(Payee),
Transaction(Transaction),
Balance(Balance),
}Expand description
A top-level directive in a Pactole journal.
Variants§
Open(Open)
Opens an account.
Close(Close)
Closes an account.
Commodity(Commodity)
Declares a commodity.
Payee(Payee)
Declares a known payee.
Transaction(Transaction)
Records a transaction and its postings.
Balance(Balance)
Asserts an account balance.
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn date(&self) -> Option<NaiveDate>
pub fn date(&self) -> Option<NaiveDate>
Returns the date this entry is recorded at, used to sort a journal chronologically before validating it.
Returns None for a Payee declaration, which carries no date
(see its doc comment): entries with no date sort before every
dated entry (a stable sort keeps their relative order), so a
payee is always known by the time any transaction is validated,
regardless of where in the file it was declared.
Trait Implementations§
impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnsafeUnpin for Entry
impl UnwindSafe for Entry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more