Module syntax

Module syntax 

Source
Expand description

Provides Ledger file format syntax representation.

Modules§

decoration
Module decoration defines the trait, which describes the extra information attached to crate::syntax data.
display
Defines data & functions for displaying syntax types.
expr
Defines value expression representation used in Ledger format. Note this is purely lexicographical and not always valid expression.
plain
Defines simplest Decoration Ident, which does decorate nothing. Also provides type aliases with Ident.
pretty_decimal
Module to define PrettyDecimal, Decimal with formatting.
tracked
Provides Tracking decoration, which attaches Tracked span information into syntax types so that report can raise error with the right position.

Structs§

AccountDeclaration
“account” directive to declare account information.
ApplyTag
“apply tag” directive content.
CommodityDeclaration
“commodity” directive to declare commodity information.
IncludeFile
“include” directive, taking a path as an argument. Path can be a relative path or an absolute path.
Lot
Lot information is a set of metadata to record the original lot which the commodity is acquired with.
Posting
Posting in a transaction to represent a particular account amount increase / decrease.
PostingAmount
This is an amout for each posting. Which contains
PriceDBEntry
Price DB entry, which contains one commodity price in another commodity on a particular date time.
TopLevelComment
Top-level comment. OK to have multi-line comment.
Transaction
Represents a transaction where the money transfered across the accounts.

Enums§

AccountDetail
Sub directives for “account” directive.
ClearState
Represents a clearing state, often combined with the ambiguity.
CommodityDetail
Sub directives for “commodity” directive.
Exchange
Exchange represents the amount expressed in the different commodity.
LedgerEntry
Top-level entry of the LedgerFile.
Metadata
Metadata represents meta information associated with transactions / posts.
MetadataValue
MetadataValue represents the value in key-value pair used in Metadata.