Skip to main content

Crate rustledger_loader

Crate rustledger_loader 

Source
Expand description

Beancount file loader with include resolution.

This crate handles loading beancount files, resolving includes, and collecting options. It builds on the parser to provide a complete loading pipeline.

§Features

  • Recursive include resolution with cycle detection
  • Options collection and parsing
  • Plugin directive collection
  • Source map for error reporting
  • Push/pop tag and metadata handling
  • Automatic GPG decryption for encrypted files (.gpg, .asc)

§Example

use rustledger_loader::Loader;
use std::path::Path;

let result = Loader::new().load(Path::new("ledger.beancount"))?;
for directive in result.directives {
    println!("{:?}", directive);
}

Re-exports§

pub use cache::CacheEntry;
pub use cache::CachedOptions;
pub use cache::CachedPlugin;
pub use cache::invalidate_cache;
pub use cache::load_cache_entry;
pub use cache::reintern_directives;
pub use cache::save_cache_entry;

Modules§

cache
Binary cache for parsed ledgers.

Structs§

ErrorLocation
Source location for an error.
Ledger
A fully processed ledger.
LedgerError
Unified error type for ledger processing.
LoadOptions
Options for loading and processing a ledger.
LoadResult
Result of loading a beancount file.
Loader
Beancount file loader.
Options
Beancount file options.
Plugin
A plugin directive.
SourceFile
A source file in the source map.
SourceMap
A map of source files for error reporting.

Enums§

ErrorSeverity
Error severity level.
LoadError
Errors that can occur during loading.
ProcessError
Errors that can occur during ledger processing.

Functions§

load
Load and fully process a beancount file.
load_raw
Load a beancount file without processing.
process
Process a raw load result into a fully processed ledger.