Skip to main content

Module types

Module types 

Source
Expand description

Plugin interface types.

These types define the contract between the plugin host and plugins. They are serialized via MessagePack across the WASM boundary.

This module re-exports types from rustledger_plugin_types, which can also be used directly by WASM plugins. Using the types crate directly allows plugins to avoid pulling in the full rustledger-plugin dependency.

Structs§

AlternativeWrapper
Wire-format counterpart to rustledger_ops::enrichment::Alternative.
AmountData
Amount data for serialization.
BalanceData
Balance assertion data.
CloseData
Close account data.
CommodityData
Commodity declaration data.
CostData
Cost data for serialization.
CustomData
Custom directive data.
DirectiveWrapper
A wrapper around directives for serialization.
DocumentData
Document data.
EnrichedImporterOutput
Wire-format output returned from a WASM importer’s extract_enriched. Each directive is paired with per-directive categorization metadata.
EnrichmentWrapper
Wire-format counterpart to rustledger_ops::enrichment::Enrichment.
EventData
Event data.
IdentifyInput
Wire-format input to a WASM importer’s identify entry point.
IdentifyOutput
Wire-format output from a WASM importer’s identify.
ImporterInput
Wire-format input passed from the host to a WASM importer’s extract / extract_enriched entry point.
ImporterOutput
Wire-format output returned from a WASM importer’s extract.
MetadataOutput
Wire-format output from a WASM importer’s metadata entry point. Returned once at load time and cached by the host registry — used for Importer::name() and Importer::description() on the wrapper.
NoteData
Note data.
OpenData
Open account data.
PadData
Pad directive data.
PluginError
Error generated by a plugin.
PluginInput
Input passed to a plugin.
PluginOptions
Ledger options passed to plugins.
PluginOutput
Output returned from a plugin.
PostingData
Posting data for serialization.
PriceAnnotationData
Price annotation data.
PriceData
Price directive data.
QueryData
Query directive data.
SourceSpan
Source-location metadata for a posting that the host parsed from a beancount file.
TransactionData
Transaction data for serialization.

Enums§

CostNumberData
The numeric component of a CostData.
DirectiveData
Directive-specific data.
MetaValueData
Metadata value for serialization.
PluginErrorSeverity
Severity of a plugin error.
PluginOp
One operation in a PluginOutput’s ordered op list.
PriceAnnotationView
Typed view of a PriceAnnotationData.

Constants§

ABI_VERSION
Version of the host/guest WASM ABI defined by this crate.
ABI_VERSION_EXPORT
The WASM export symbol a guest uses to advertise ABI_VERSION. The wasm_*_main! macros emit it; the host looks it up by this name. Kept here as the single source of truth shared by both sides.

Functions§

sort_directives
Sort directives using beancount’s standard ordering.
validate_op_coverage
Validate that ops form a complete, non-overlapping cover of the input.