16 releases (5 breaking)

0.6.3 Jan 24, 2021
0.6.2 Jan 24, 2021
0.5.0 Jan 9, 2021
0.4.7 Dec 18, 2020
0.1.0 Nov 22, 2020

#1657 in Text processing

ISC license

50KB
1.5K SLoC

GitHub Workflow Status (branch)

Minimal, safe and flexible in-memory bookkeeping API

Features

  • The book balance is guaranteed at compile time.
  • Explicit ordering of transactions
  • Strong support for multiple units (currencies)
  • Use your own number types
  • Arbitrary extra data
  • [Introduction documentation][mod@introduction]

Non-features

Everything in this list is beyond the scope of this library:

  • Account types (asset/liability/income/expense/etc.)
  • Reports

Todo

  • Cache balance calculations
  • Serialization

Introduction

Read [the entire introduction][mod@introduction].

A note on panics

"This API can panic in a bunch of places. I don't like that. I don't feel safe. How about returning Results, instead?"

Results and errors are for when a function might fail despite all caution. In this crate, panics would only occur on wrong usage. Having this crate return Results would complicate the API and — worse — would give the impression that function calls could fail even when used correctly. I'd like the user to be confident that with correct usage the API is safe.

Get involved

If you're using this crate, then please let me know—I'd be so happy!

If you have a question, find an issue and/or would like to contribute, please open an issue on the tracker or send me an email to mightyiampresence@gmail.com.

Dependencies

~280KB