Skip to main content

load

Function load 

Source
pub fn load(path: &Path, options: &LoadOptions) -> Result<Ledger, ProcessError>
Expand description

Load and fully process a beancount file.

This is the main entry point, equivalent to Python’s loader.load_file(). It performs: parse → sort → book → plugins → validate.

§Example

use rustledger_loader::{load, LoadOptions};
use std::path::Path;

let ledger = load(Path::new("ledger.beancount"), LoadOptions::default())?;
for error in &ledger.errors {
    eprintln!("{}: {}", error.code, error.message);
}