pub struct Ledger {
pub commodity_prices: Vec<CommodityPrice>,
pub transactions: Vec<Transaction>,
}
Expand description
Main document. Contains transactions and/or commodity prices.
Fields§
§commodity_prices: Vec<CommodityPrice>
§transactions: Vec<Transaction>
Trait Implementations§
Source§impl<'a> From<&'a Ledger> for MonthlyReport
impl<'a> From<&'a Ledger> for MonthlyReport
Source§impl Serializer for Ledger
impl Serializer for Ledger
fn write<W>(
&self,
writer: &mut W,
settings: &SerializerSettings,
) -> Result<(), Error>where
W: Write,
fn to_string_pretty(&self, settings: &SerializerSettings) -> String
Source§impl TryFrom<Ledger> for Ledger
impl TryFrom<Ledger> for Ledger
Source§fn try_from(ledger: Ledger) -> Result<Self, Self::Error>
fn try_from(ledger: Ledger) -> Result<Self, Self::Error>
Fails if any transactions are unbalanced, any balance assertions fail, or if an unbalanced
virtual posting (account name in ()
) has no amount.
“Balance assertions” are postings with both amount and balance provided. The calculated amount using the balance must match the given amount.
impl Eq for Ledger
impl StructuralPartialEq for Ledger
Auto Trait Implementations§
impl Freeze for Ledger
impl RefUnwindSafe for Ledger
impl Send for Ledger
impl Sync for Ledger
impl Unpin for Ledger
impl UnwindSafe for Ledger
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