Skip to main content

LedgerEntry

Struct LedgerEntry 

Source
pub struct LedgerEntry<'i, Deco: Decoration> {
    pub separation: Separation,
    pub statement: LedgerStatement<'i, Deco>,
}
Expand description

Top-level entry of the LedgerFile, a LedgerStatement with its layout context.

Fields§

§separation: Separation

How the entry is separated from the previous entry.

§statement: LedgerStatement<'i, Deco>

The statement itself.

Implementations§

Source§

impl<'i, Deco: Decoration> LedgerEntry<'i, Deco>

Source

pub fn new(statement: LedgerStatement<'i, Deco>) -> Self

Creates an entry separated from the previous entry by a blank line, which is the usual way to write a Ledger file.

Source

pub fn immediate(self) -> Self

Marks the entry as immediately following the previous entry.

Trait Implementations§

Source§

impl<'i, Deco: Decoration> AsUndecorated<LedgerEntry<'i, Deco>> for LedgerEntry<'i, Deco>

Source§

fn as_undecorated(&self) -> &LedgerEntry<'i, Deco>

Source§

impl<'i, Deco: Decoration> Debug for LedgerEntry<'i, Deco>

Source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'i, Deco: Decoration> Eq for LedgerEntry<'i, Deco>

Source§

impl<'i, Deco: Decoration> PartialEq for LedgerEntry<'i, Deco>

Source§

fn eq(&self, __other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Auto Trait Implementations§

§

impl<'i, Deco> Freeze for LedgerEntry<'i, Deco>
where LedgerStatement<'i, Deco>: Freeze,

§

impl<'i, Deco> RefUnwindSafe for LedgerEntry<'i, Deco>
where LedgerStatement<'i, Deco>: RefUnwindSafe,

§

impl<'i, Deco> Send for LedgerEntry<'i, Deco>
where LedgerStatement<'i, Deco>: Send,

§

impl<'i, Deco> Sync for LedgerEntry<'i, Deco>
where LedgerStatement<'i, Deco>: Sync,

§

impl<'i, Deco> Unpin for LedgerEntry<'i, Deco>
where LedgerStatement<'i, Deco>: Unpin,

§

impl<'i, Deco> UnsafeUnpin for LedgerEntry<'i, Deco>
where LedgerStatement<'i, Deco>: UnsafeUnpin,

§

impl<'i, Deco> UnwindSafe for LedgerEntry<'i, Deco>
where LedgerStatement<'i, Deco>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.