pub struct ParsedLedger {
pub accounts: List<Account>,
pub payees: List<Payee>,
pub commodities: List<Currency>,
pub transactions: Vec<Transaction<RawPosting>>,
pub prices: Vec<ParsedPrice>,
pub comments: Vec<Comment>,
pub tags: Vec<Tag>,
pub files: Vec<PathBuf>,
}Fields§
§accounts: List<Account>§payees: List<Payee>§commodities: List<Currency>§transactions: Vec<Transaction<RawPosting>>§prices: Vec<ParsedPrice>§comments: Vec<Comment>§files: Vec<PathBuf>Implementations§
Source§impl ParsedLedger
impl ParsedLedger
Sourcepub fn to_ledger(self, options: &CommonOpts) -> Result<Ledger, Box<dyn Error>>
pub fn to_ledger(self, options: &CommonOpts) -> Result<Ledger, Box<dyn Error>>
Creates a proper ledger from a parsed ledger
- Create the lists of accounts, commodities and payees
- Load the commodity prices
- Balance the transactions by filling in missing amounts (this previously sorts the transactions by date)
- Create automated transactions
- Checks whether transactions are balanced again
There may be room for optimization here
Trait Implementations§
Source§impl Clone for ParsedLedger
impl Clone for ParsedLedger
Source§fn clone(&self) -> ParsedLedger
fn clone(&self) -> ParsedLedger
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParsedLedger
impl Debug for ParsedLedger
Auto Trait Implementations§
impl Freeze for ParsedLedger
impl !RefUnwindSafe for ParsedLedger
impl !Send for ParsedLedger
impl !Sync for ParsedLedger
impl Unpin for ParsedLedger
impl !UnwindSafe for ParsedLedger
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