Struct ledger_utils::simplified_ledger::Ledger
source · 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 PartialEq for Ledger
impl PartialEq for Ledger
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(value: Ledger) -> Result<Self, Self::Error>
fn try_from(value: 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.
§type Error = SimplificationError
type Error = SimplificationError
The type returned in the event of a conversion error.
impl Eq for Ledger
impl StructuralPartialEq for Ledger
Auto Trait Implementations§
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