Skip to main content

EventKind

Enum EventKind 

Source
pub enum EventKind {
    Lines,
    Reverses,
    Close,
    Bill,
    Invoice,
    WriteOff,
    RunDepreciation,
    DisposeAsset,
    RunSchedules,
    RegisterSchedule,
}
Expand description

The kind of an event.

Variants§

§

Lines

An entry, by its lines.

§

Reverses

A reversal of an earlier event’s entry.

§

Close

A close of a period.

§

Bill

A bill.

§

Invoice

An invoice.

§

WriteOff

A bad-debt write-off of an earlier invoice (rules.md B-41).

§

RunDepreciation

A depreciation run.

§

DisposeAsset

A fixed asset’s disposal.

§

RunSchedules

Every schedule’s months due through a day.

§

RegisterSchedule

A schedule’s registration (posts nothing).

Implementations§

Source§

impl EventKind

Source

pub fn key(self) -> &'static str

The key the example spells it with.

Source

pub fn is_dated(self) -> bool

True when the example gives the event’s day (a command that dates its own entries takes none).

Source

pub fn is_described(self) -> bool

True when the example describes the event (a command writes its own descriptions).

Source

pub fn may_refuse(self) -> bool

True when the books take it whole or not at all, so refused may be given: a reversal, an entry or a command, never a close, a bill or an invoice (those are corrected by a reversal). An entry posts whole or not at all, so a hand line the control guard refuses is one too.

Source

pub fn may_tag(self) -> bool

True when the example may tag it with parties and a payment method.

Trait Implementations§

Source§

impl Clone for EventKind

Source§

fn clone(&self) -> EventKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for EventKind

Source§

impl Debug for EventKind

Source§

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

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

impl Eq for EventKind

Source§

impl PartialEq for EventKind

Source§

fn eq(&self, other: &EventKind) -> bool

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for EventKind

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.