Skip to main content

GnuCash

Struct GnuCash 

Source
pub struct GnuCash { /* private fields */ }
Expand description

GnuCash, as bookspec’s Engine.

Implementations§

Source§

impl GnuCash

Source

pub fn new() -> Self

An empty engine.

Trait Implementations§

Source§

impl Default for GnuCash

Source§

fn default() -> GnuCash

Returns the “default value” for a type. Read more
Source§

impl Engine for GnuCash

Source§

fn load(&mut self, setup: &Setup) -> Result<(), Refusal>

Set the books up: the chart, the fixed assets, the schedules, the parties, the members, the payees and their dated decisions, the payment methods and the projects.
Source§

fn apply(&mut self, event: &Event) -> Result<(), Refusal>

Apply one event: an entry, a reversal, a close, a bill, an invoice, a depreciation run, a disposal, a schedules run or a schedule’s registration. An event the engine refuses leaves the books as they were.
Source§

fn query(&self, q: &Query) -> Result<Value, Refusal>

Answer one query with the engine’s own figures. A figure is an exact decimal string (never a JSON number: no engine may round a cent through a float), a date is YYYY-MM-DD, and a format query’s value is its lines or rows. A query the engine refuses (a period the rule refuses, a command it refuses) is an Err.
Source§

fn claims(&self) -> Claims

The rules and choices this engine declares.
Source§

fn change(&mut self, _change: &ChangeSpec) -> Result<(), Refusal>

Apply one change that posts no entry (a [[changes]] entry).

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> 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 = 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.