Struct lumi::parse::LedgerDraft [−][src]
Contains the information collected by a parser from the source files, which might include unbalanced transactions or other errors.
Fields
accounts: HashMap<Account, AccountInfoDraft>
commodities: HashMap<Currency, (Meta, Source)>
txns: Vec<TxnDraft>
options: HashMap<String, (String, Source)>
events: HashMap<String, Vec<EventInfo>>
Implementations
impl LedgerDraft
[src]
pub fn into_ledger(self) -> (Ledger, Vec<Error>)
[src]
Consuming self
, returns a Ledger
and the errors encountered
during verifying accounts, calculating missing amounts or omitted cost
basis information, checking balance
assertions, and completing pad
directives. If a directive causes an error with ErrorLevel::Error
,
it is dropped.
In this case, the returned Ledger
contains a subset of the information in self
.
impl LedgerDraft
[src]
pub fn add_option(
&mut self,
key: String,
val: String,
src: Source
) -> Result<(), Error>
[src]
&mut self,
key: String,
val: String,
src: Source
) -> Result<(), Error>
Adds the value of an option into a LedgerDraft
. Returns Err(Error)
if
the option key
is already specified in self
.
pub fn add_commodity(
&mut self,
commodity: Currency,
meta: Meta,
src: Source
) -> Result<(), Error>
[src]
&mut self,
commodity: Currency,
meta: Meta,
src: Source
) -> Result<(), Error>
Adds a type of commodity into a LedgerDraft
. Returns Err(Error)
if
commodity
is already in self
.
impl LedgerDraft
[src]
pub fn merge(&mut self, another: LedgerDraft) -> Vec<Error>
[src]
Merges two LedgerDraft
into one and returns errors detected, e.g.,
duplicated defections of accounts.
Trait Implementations
impl Clone for LedgerDraft
[src]
fn clone(&self) -> LedgerDraft
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for LedgerDraft
[src]
impl Default for LedgerDraft
[src]
fn default() -> LedgerDraft
[src]
impl Eq for LedgerDraft
[src]
impl PartialEq<LedgerDraft> for LedgerDraft
[src]
fn eq(&self, other: &LedgerDraft) -> bool
[src]
fn ne(&self, other: &LedgerDraft) -> bool
[src]
impl StructuralEq for LedgerDraft
[src]
impl StructuralPartialEq for LedgerDraft
[src]
Auto Trait Implementations
impl RefUnwindSafe for LedgerDraft
impl Send for LedgerDraft
impl Sync for LedgerDraft
impl Unpin for LedgerDraft
impl UnwindSafe for LedgerDraft
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,