domain tier

domain-ledger

Double-entry accounting: accounts, journal entries, and transactions

Double-entry accounting: accounts, journal entries, and transactions

Tierdomain
Roleunclassified (baselined)
Pathcrates/domain/ledger
Edition2021
Targetsdomain_ledger
Public items107 across 1 module
Tests73

What it is for

Double-entry accounting library crates for financial transaction tracking.

This crate provides:

Posting Utilities

The posting module provides helpers for common accounting transactions:

Capabilities

crate root

Double-entry accounting library crates for financial transaction tracking.

Item
fn calculate_balance(account_type : AccountType, line_items : & LineItem) -> Decimal
fn validate_accounting_equation(assets : Decimal, liabilities : Decimal, equity : Decimal, income : Decimal, expenses : Decimal,) -> bool

Account:Account

Double-entry accounting library crates for financial transaction tracking.

Item
pub struct Account

Account:activate

Double-entry accounting library crates for financial transaction tracking.

Item
Account :: fn activate(& mut self)

Account:created

Double-entry accounting library crates for financial transaction tracking.

Item
Account :: fn created_at(& self) -> chrono::DateTime <Utc>

Account:deactivate

Double-entry accounting library crates for financial transaction tracking.

Item
Account :: fn deactivate(& mut self)

Account:deleted

Double-entry accounting library crates for financial transaction tracking.

Item
Account :: fn deleted_at(& self) -> Option <chrono::DateTime <Utc>>

Account:id

Double-entry accounting library crates for financial transaction tracking.

Item
Account :: fn id(& self) -> Uuid

Account:is

Double-entry accounting library crates for financial transaction tracking.

Item
Account :: fn is_debit_normal(& self) -> bool
Account :: fn is_credit_normal(& self) -> bool

Account:new

Double-entry accounting library crates for financial transaction tracking.

Item
Account :: fn new(code : impl Into <String>, name : impl Into <String>, account_type : AccountType,) -> Self

Account:normal

Double-entry accounting library crates for financial transaction tracking.

Item
Account :: fn normal_balance(& self) -> BalanceType

Account:restore

Double-entry accounting library crates for financial transaction tracking.

Item
Account :: fn restore(& mut self)

Account:soft

Double-entry accounting library crates for financial transaction tracking.

Item
Account :: fn soft_delete(& mut self)

Account:touch

Double-entry accounting library crates for financial transaction tracking.

Item
Account :: fn touch(& mut self)

Account:updated

Double-entry accounting library crates for financial transaction tracking.

Item
Account :: fn updated_at(& self) -> chrono::DateTime <Utc>

Account:with

Double-entry accounting library crates for financial transaction tracking.

Item
Account :: fn with_parent(mut self, parent_id : Uuid) -> Self
Account :: fn with_description(mut self, description : impl Into <String>) -> Self
Account :: fn with_currency(mut self, currency : impl Into <String>) -> Self
Account :: fn with_subtype(mut self, subtype : AccountSubtype) -> Self

AccountSubtype

Double-entry accounting library crates for financial transaction tracking.

Item
pub enum AccountSubtype
AccountSubtype :: fn account_type(& self) -> AccountType
AccountSubtype :: fn is_reconcilable(& self) -> bool
AccountSubtype :: fn all() -> & 'static AccountSubtype
AccountSubtype :: fn parse_for(account_type : AccountType, s : & str) -> std::result::Result <Self, String>
AccountSubtype :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
AccountSubtype :: fn from_str(s : & str) -> std::result::Result <Self, Self::Err>

AccountType

Double-entry accounting library crates for financial transaction tracking.

Item
pub enum AccountType
AccountType :: fn normal_balance(& self) -> BalanceType
AccountType :: fn is_debit_normal(& self) -> bool
AccountType :: fn is_credit_normal(& self) -> bool
AccountType :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
AccountType :: fn from_str(s : & str) -> std::result::Result <Self, Self::Err>

BalanceType

Double-entry accounting library crates for financial transaction tracking.

Item
pub enum BalanceType
BalanceType :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result

EntryDirection

Double-entry accounting library crates for financial transaction tracking.

Item
pub enum EntryDirection
EntryDirection :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
EntryDirection :: fn from_str(s : & str) -> std::result::Result <Self, Self::Err>

EntryStatus

Double-entry accounting library crates for financial transaction tracking.

Item
pub enum EntryStatus
EntryStatus :: fn is_editable(& self) -> bool
EntryStatus :: fn affects_balances(& self) -> bool
EntryStatus :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
EntryStatus :: fn from_str(s : & str) -> std::result::Result <Self, Self::Err>

JournalEntry:JournalEntry

Double-entry accounting library crates for financial transaction tracking.

Item
pub struct JournalEntry

JournalEntry:add

Double-entry accounting library crates for financial transaction tracking.

Item
JournalEntry :: fn add_debit(& mut self, account_id : Uuid, amount : Money) -> Result <()>
JournalEntry :: fn add_debit_with_description(& mut self, account_id : Uuid, amount : Money, description : impl Into <String>,) -> Result <()>
JournalEntry :: fn add_credit(& mut self, account_id : Uuid, amount : Money) -> Result <()>
JournalEntry :: fn add_credit_with_description(& mut self, account_id : Uuid, amount : Money, description : impl Into <String>,) -> Result <()>

JournalEntry:created

Double-entry accounting library crates for financial transaction tracking.

Item
JournalEntry :: fn created_at(& self) -> chrono::DateTime <Utc>

JournalEntry:credits

Double-entry accounting library crates for financial transaction tracking.

Item
JournalEntry :: fn credits(& self) -> Vec <& LineItem>

JournalEntry:debits

Double-entry accounting library crates for financial transaction tracking.

Item
JournalEntry :: fn debits(& self) -> Vec <& LineItem>

JournalEntry:id

Double-entry accounting library crates for financial transaction tracking.

Item
JournalEntry :: fn id(& self) -> Uuid

JournalEntry:imbalance

Double-entry accounting library crates for financial transaction tracking.

Item
JournalEntry :: fn imbalance(& self) -> Decimal

JournalEntry:is

Double-entry accounting library crates for financial transaction tracking.

Item
JournalEntry :: fn is_balanced(& self) -> bool

JournalEntry:line

Double-entry accounting library crates for financial transaction tracking.

Item
JournalEntry :: fn line_count(& self) -> usize

JournalEntry:new

Double-entry accounting library crates for financial transaction tracking.

Item
JournalEntry :: fn new(date : NaiveDate, description : impl Into <String>) -> Self

JournalEntry:post

Double-entry accounting library crates for financial transaction tracking.

Item
JournalEntry :: fn post(& mut self) -> Result <()>

JournalEntry:total

Double-entry accounting library crates for financial transaction tracking.

Item
JournalEntry :: fn total_debits(& self) -> Decimal
JournalEntry :: fn total_credits(& self) -> Decimal

JournalEntry:updated

Double-entry accounting library crates for financial transaction tracking.

Item
JournalEntry :: fn updated_at(& self) -> chrono::DateTime <Utc>

JournalEntry:void

Double-entry accounting library crates for financial transaction tracking.

Item
JournalEntry :: fn void(& mut self) -> Result <()>

JournalEntry:with

Double-entry accounting library crates for financial transaction tracking.

Item
JournalEntry :: fn with_reference(mut self, reference : impl Into <String>) -> Self

JournalKind

Double-entry accounting library crates for financial transaction tracking.

Item
pub enum JournalKind
JournalKind :: fn all() -> & 'static JournalKind
JournalKind :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
JournalKind :: fn from_str(s : & str) -> std::result::Result <Self, Self::Err>

LedgerError

Double-entry accounting library crates for financial transaction tracking.

Item
pub enum LedgerError

LineItem

Double-entry accounting library crates for financial transaction tracking.

Item
pub struct LineItem
LineItem :: fn new(journal_entry_id : Uuid, account_id : Uuid, amount : Money, direction : EntryDirection,) -> Self
LineItem :: fn with_description(mut self, description : impl Into <String>) -> Self
LineItem :: fn with_sequence(mut self, sequence : i32) -> Self
LineItem :: fn is_debit(& self) -> bool
LineItem :: fn is_credit(& self) -> bool
LineItem :: fn id(& self) -> Uuid

Result

Double-entry accounting library crates for financial transaction tracking.

Item
pub type Result<T>: std::result::Result <T, LedgerError>

posting (other)

Posting utilities for common accounting transactions.

Item
fn create_reversal(original : & JournalEntry, reversal_date : NaiveDate) -> Result <JournalEntry>

AccountConfig

Posting utilities for common accounting transactions.

Item
pub struct AccountConfig
AccountConfig :: fn get_cash_account(& self, payment_type : PaymentType) -> Uuid

ExpensePostingData

Posting utilities for common accounting transactions.

Item
pub struct ExpensePostingData
ExpensePostingData :: fn new(expense_date : NaiveDate, description : impl Into <String>, amount : Money, expense_account_id : Uuid, payment_account_id : Uuid,) -> Self
ExpensePostingData :: fn with_vendor(mut self, vendor_id : Uuid) -> Self
ExpensePostingData :: fn with_reference(mut self, reference : impl Into <String>) -> Self
ExpensePostingData :: fn create_entry(& self) -> Result <JournalEntry>

InvoicePostingData

Posting utilities for common accounting transactions.

Item
pub struct InvoicePostingData
InvoicePostingData :: fn new(invoice_date : NaiveDate, invoice_number : impl Into <String>, party_id : Uuid, subtotal : Money, tax_amount : Money, ar_account_id : Uuid, revenue_account_id : Uuid,) -> Self
InvoicePostingData :: fn with_tax_account(mut self, account_id : Uuid) -> Self
InvoicePostingData :: fn with_reference(mut self, reference : impl Into <String>) -> Self
InvoicePostingData :: fn create_entry(& self) -> Result <JournalEntry>

PaymentPostingData

Posting utilities for common accounting transactions.

Item
pub struct PaymentPostingData
PaymentPostingData :: fn new(payment_date : NaiveDate, payment_number : impl Into <String>, party_id : Uuid, amount : Money, payment_type : PaymentType, cash_account_id : Uuid, ar_account_id : Uuid,) -> Self
PaymentPostingData :: fn with_reference(mut self, reference : impl Into <String>) -> Self
PaymentPostingData :: fn with_description(mut self, description : impl Into <String>) -> Self
PaymentPostingData :: fn create_entry(& self) -> Result <JournalEntry>

PaymentType

Posting utilities for common accounting transactions.

Item
pub enum PaymentType

PostingBuilder

Posting utilities for common accounting transactions.

Item
pub struct PostingBuilder
PostingBuilder :: fn new(date : NaiveDate, description : impl Into <String>) -> Self
PostingBuilder :: fn with_reference(mut self, reference : impl Into <String>) -> Self
PostingBuilder :: fn debit(mut self, account_id : Uuid, amount : Money, description : impl Into <String>,) -> Self
PostingBuilder :: fn credit(mut self, account_id : Uuid, amount : Money, description : impl Into <String>,) -> Self
PostingBuilder :: fn line(mut self, line : PostingLine) -> Self
PostingBuilder :: fn total_debits(& self) -> Decimal
PostingBuilder :: fn total_credits(& self) -> Decimal
PostingBuilder :: fn is_balanced(& self) -> bool
PostingBuilder :: fn build(self) -> Result <JournalEntry>

PostingLine

Posting utilities for common accounting transactions.

Item
pub struct PostingLine
PostingLine :: fn debit(account_id : Uuid, amount : Money, description : impl Into <String>) -> Self
PostingLine :: fn credit(account_id : Uuid, amount : Money, description : impl Into <String>) -> Self

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

domain_ledger

Public surface

`crate root`

ItemWhat it is
pub enum LedgerErrorErrors that can occur in ledger operations.
pub type Result<T>: std::result::Result <T, LedgerError>Result type for ledger operations.
pub enum AccountTypeType of account in the chart of accounts.
AccountType :: fn normal_balance(& self) -> BalanceTypeReturns the normal balance type for this account type.
AccountType :: fn is_debit_normal(& self) -> boolReturns true if this account type has a normal debit balance.
AccountType :: fn is_credit_normal(& self) -> boolReturns true if this account type has a normal credit balance.
AccountType :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
AccountType :: fn from_str(s : & str) -> std::result::Result <Self, Self::Err>
pub enum AccountSubtypeSub-classification of an account, scoped to its AccountType
AccountSubtype :: fn account_type(& self) -> AccountTypeThe AccountType this subtype belongs to.
AccountSubtype :: fn is_reconcilable(& self) -> boolWhether accounts of this subtype are reconciled against a statement
AccountSubtype :: fn all() -> & 'static AccountSubtypeAll subtype variants, in declaration order
AccountSubtype :: fn parse_for(account_type : AccountType, s : & str) -> std::result::Result <Self, String>Parse a subtype string and assert it is valid for account_type
AccountSubtype :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
AccountSubtype :: fn from_str(s : & str) -> std::result::Result <Self, Self::Err>
pub enum BalanceTypeBalance type (debit or credit).
BalanceType :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
pub enum EntryDirectionDirection of a line item (debit or credit).
EntryDirection :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
EntryDirection :: fn from_str(s : & str) -> std::result::Result <Self, Self::Err>
pub enum EntryStatusStatus of a journal entry.
EntryStatus :: fn is_editable(& self) -> boolReturns true if the entry can be modified.
EntryStatus :: fn affects_balances(& self) -> boolReturns true if the entry is included in balance calculations.
EntryStatus :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
EntryStatus :: fn from_str(s : & str) -> std::result::Result <Self, Self::Err>
pub enum JournalKindWhat KIND of journal entry this is — an advisory label that drives UI seeding and reporting, not the posting path (all kinds are balanced N-line entries posted identically)
JournalKind :: fn all() -> & 'static JournalKindAll kinds, in declaration order.
JournalKind :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
JournalKind :: fn from_str(s : & str) -> std::result::Result <Self, Self::Err>
pub struct AccountAn account in the chart of accounts.
Account :: fn new(code : impl Into <String>, name : impl Into <String>, account_type : AccountType,) -> SelfCreates a new account.
Account :: fn with_parent(mut self, parent_id : Uuid) -> SelfSets the parent account.
Account :: fn with_description(mut self, description : impl Into <String>) -> SelfSets the description.
Account :: fn with_currency(mut self, currency : impl Into <String>) -> SelfSets the currency.
Account :: fn with_subtype(mut self, subtype : AccountSubtype) -> SelfSets the account subtype
Account :: fn normal_balance(& self) -> BalanceTypeReturns the normal balance type for this account.
Account :: fn is_debit_normal(& self) -> boolReturns true if this account has a normal debit balance.
Account :: fn is_credit_normal(& self) -> boolReturns true if this account has a normal credit balance.
Account :: fn deactivate(& mut self)Deactivates the account.
Account :: fn activate(& mut self)Reactivates the account.
Account :: fn id(& self) -> Uuid
Account :: fn created_at(& self) -> chrono::DateTime <Utc>
Account :: fn updated_at(& self) -> chrono::DateTime <Utc>
Account :: fn deleted_at(& self) -> Option <chrono::DateTime <Utc>>
Account :: fn touch(& mut self)Updates the updated_at timestamp.
Account :: fn soft_delete(& mut self)Soft deletes the account.
Account :: fn restore(& mut self)Restores a soft-deleted account.
pub struct LineItemA line item in a journal entry (debit or credit).
LineItem :: fn new(journal_entry_id : Uuid, account_id : Uuid, amount : Money, direction : EntryDirection,) -> SelfCreates a new line item.
LineItem :: fn with_description(mut self, description : impl Into <String>) -> SelfSets the description.
LineItem :: fn with_sequence(mut self, sequence : i32) -> SelfSets the sequence number.
LineItem :: fn is_debit(& self) -> boolReturns true if this is a debit entry.
LineItem :: fn is_credit(& self) -> boolReturns true if this is a credit entry.
LineItem :: fn id(& self) -> Uuid
pub struct JournalEntryA journal entry (transaction) that groups related debits and credits.
JournalEntry :: fn new(date : NaiveDate, description : impl Into <String>) -> SelfCreates a new journal entry.
JournalEntry :: fn with_reference(mut self, reference : impl Into <String>) -> SelfSets the reference number.
JournalEntry :: fn add_debit(& mut self, account_id : Uuid, amount : Money) -> Result <()>Adds a debit line item
JournalEntry :: fn add_debit_with_description(& mut self, account_id : Uuid, amount : Money, description : impl Into <String>,) -> Result <()>Adds a debit line item with description
JournalEntry :: fn add_credit(& mut self, account_id : Uuid, amount : Money) -> Result <()>Adds a credit line item
JournalEntry :: fn add_credit_with_description(& mut self, account_id : Uuid, amount : Money, description : impl Into <String>,) -> Result <()>Adds a credit line item with description
JournalEntry :: fn total_debits(& self) -> DecimalReturns the total of all debit entries.
JournalEntry :: fn total_credits(& self) -> DecimalReturns the total of all credit entries.
JournalEntry :: fn is_balanced(& self) -> boolReturns true if the entry is balanced (debits = credits).
JournalEntry :: fn imbalance(& self) -> DecimalReturns the difference between debits and credits.
JournalEntry :: fn post(& mut self) -> Result <()>Posts the entry, making it immutable
JournalEntry :: fn void(& mut self) -> Result <()>Voids the entry (for audit trail - doesn't delete)
JournalEntry :: fn line_count(& self) -> usizeReturns the number of line items.
JournalEntry :: fn debits(& self) -> Vec <& LineItem>Returns debit line items.
JournalEntry :: fn credits(& self) -> Vec <& LineItem>Returns credit line items.
JournalEntry :: fn id(& self) -> Uuid
JournalEntry :: fn created_at(& self) -> chrono::DateTime <Utc>
JournalEntry :: fn updated_at(& self) -> chrono::DateTime <Utc>
fn calculate_balance(account_type : AccountType, line_items : & LineItem) -> DecimalCalculates the balance for an account given its line items
fn validate_accounting_equation(assets : Decimal, liabilities : Decimal, equity : Decimal, income : Decimal, expenses : Decimal,) -> boolValidates that the accounting equation holds

`posting`

ItemWhat it is
pub struct PostingLineA posting line representing a single debit or credit.
PostingLine :: fn debit(account_id : Uuid, amount : Money, description : impl Into <String>) -> SelfCreates a debit posting line.
PostingLine :: fn credit(account_id : Uuid, amount : Money, description : impl Into <String>) -> SelfCreates a credit posting line.
pub struct InvoicePostingDataData required to post an invoice to the ledger.
InvoicePostingData :: fn new(invoice_date : NaiveDate, invoice_number : impl Into <String>, party_id : Uuid, subtotal : Money, tax_amount : Money, ar_account_id : Uuid, revenue_account_id : Uuid,) -> SelfCreates new invoice posting data.
InvoicePostingData :: fn with_tax_account(mut self, account_id : Uuid) -> SelfSets the tax account.
InvoicePostingData :: fn with_reference(mut self, reference : impl Into <String>) -> SelfSets the reference.
InvoicePostingData :: fn create_entry(& self) -> Result <JournalEntry>Creates a journal entry for this invoice
pub enum PaymentTypePayment method affecting which cash account to use.
pub struct PaymentPostingDataData required to post a payment to the ledger.
PaymentPostingData :: fn new(payment_date : NaiveDate, payment_number : impl Into <String>, party_id : Uuid, amount : Money, payment_type : PaymentType, cash_account_id : Uuid, ar_account_id : Uuid,) -> SelfCreates new payment posting data.
PaymentPostingData :: fn with_reference(mut self, reference : impl Into <String>) -> SelfSets the reference.
PaymentPostingData :: fn with_description(mut self, description : impl Into <String>) -> SelfSets a custom description.
PaymentPostingData :: fn create_entry(& self) -> Result <JournalEntry>Creates a journal entry for this payment
pub struct ExpensePostingDataData required to post an expense to the ledger.
ExpensePostingData :: fn new(expense_date : NaiveDate, description : impl Into <String>, amount : Money, expense_account_id : Uuid, payment_account_id : Uuid,) -> SelfCreates new expense posting data.
ExpensePostingData :: fn with_vendor(mut self, vendor_id : Uuid) -> SelfSets the vendor ID.
ExpensePostingData :: fn with_reference(mut self, reference : impl Into <String>) -> SelfSets the reference.
ExpensePostingData :: fn create_entry(& self) -> Result <JournalEntry>Creates a journal entry for this expense
fn create_reversal(original : & JournalEntry, reversal_date : NaiveDate) -> Result <JournalEntry>Creates a reversing journal entry from an existing entry
pub struct AccountConfigAccount configuration for common posting scenarios.
AccountConfig :: fn get_cash_account(& self, payment_type : PaymentType) -> UuidReturns the appropriate cash/bank account for a payment type.
pub struct PostingBuilderBuilder for creating multi-line journal entries.
PostingBuilder :: fn new(date : NaiveDate, description : impl Into <String>) -> SelfCreates a new posting builder.
PostingBuilder :: fn with_reference(mut self, reference : impl Into <String>) -> SelfSets the reference.
PostingBuilder :: fn debit(mut self, account_id : Uuid, amount : Money, description : impl Into <String>,) -> SelfAdds a debit line.
PostingBuilder :: fn credit(mut self, account_id : Uuid, amount : Money, description : impl Into <String>,) -> SelfAdds a credit line.
PostingBuilder :: fn line(mut self, line : PostingLine) -> SelfAdds a posting line.
PostingBuilder :: fn total_debits(& self) -> DecimalReturns the total debits.
PostingBuilder :: fn total_credits(& self) -> DecimalReturns the total credits.
PostingBuilder :: fn is_balanced(& self) -> boolReturns true if the posting is balanced.
PostingBuilder :: fn build(self) -> Result <JournalEntry>Builds the journal entry

No pub use re-exports: every item above is declared in this crate.

Boundary

Reaches into foundation.

Shares tier domain with 41 other crates: domain-agreements, domain-ai-report, domain-billing, domain-catalog, domain-classify, domain-comments, domain-competitive-intel, domain-contact, … (41 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)domain
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/domain/ledger
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_domain["domain"] --> n_foundation["foundation"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`foundation-basemodels`foundationnoalways
`foundation-money`foundationnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
chrono^0.4serdenoalways
rust_decimal^1serdenoalways
serde^1derivenoalways
serde_json^1noalways
thiserror^2noalways
uuid^1v4, v7, serde, jsnoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
rust_decimal_macros^1noalways
tokio-test^0.4noalways

Build. None.

Depended on by. 3 workspace crates.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_application_ledger["application-ledger"] -->|uses| SELF
  n_application_ledger_accounts["application-ledger-accounts"] -->|uses| SELF
  n_application_ledger_entries["application-ledger-entries"] -->|uses| SELF
  SELF["domain-ledger"]
  SELF -->|runtime| n_foundation_basemodels["foundation-basemodels"]
  SELF -->|runtime| n_foundation_money["foundation-money"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
libdomain_ledger`src/lib.rs`

Error model

Error typeNamed by
LedgerErrorResult

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

3 workspace crates depend on this one: application-ledger, application-ledger-accounts, application-ledger-entries.

Verification

KindCount
Unit tests73
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root1308
posting800

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc88107
Public modules with a //! block11
pie showData
    title Public items with rustdoc
    "Documented" : 88
    "No rustdoc detected" : 19

Metrics

MetricValue
Rust source files2
Source lines2762
Code lines2052
Public API items107
Public modules1
Tests73
Examples0
Cargo features0
Direct runtime dependencies8
Workspace reverse dependencies3
pie showData
    title Public API by kind
    "enum" : 8
    "function" : 3
    "method" : 86
    "struct" : 9
    "type alias" : 1
pie showData
    title Rust source composition
    "Code" : 2052
    "Blank or comment" : 710

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

All domain · Manual