pub struct ImporterInput {
pub path: String,
pub content: Vec<u8>,
pub account: String,
pub currency: Option<String>,
pub options: HashMap<String, String>,
}Expand description
Wire-format input passed from the host to a WASM importer’s
extract / extract_enriched entry point.
§options design note
The options map is String -> String. Values that are
semantically numbers, booleans, or other types (e.g.
skip_rows = 5, has_header = true, delimiter = ",") are
string-encoded on the host side and parsed by the WASM importer.
This keeps the WASM ABI minimal (no serde_json::Value or rmpv
dep in the guest crate) at the cost of pushing string parsing into
every importer. A future additive field (options_typed) could
carry typed values if needed; not in v1.0 scope.
Fields§
§path: StringSource file path. Informational only — the WASM sandbox cannot open this. Used for diagnostics and fingerprint generation.
content: Vec<u8>File content bytes. The host reads the file and forwards the bytes here so the WASM importer doesn’t need filesystem access.
account: StringTarget account for imported transactions
(from ImporterConfig.account).
currency: Option<String>Currency for amounts (from ImporterConfig.currency).
options: HashMap<String, String>Free-form importer-specific options. The host serializes
importers.toml entries’ arbitrary fields into this map; the
WASM importer reads the keys it knows about. Keeps the
wire format independent of any host-side config struct shape.
See the type-level doc for the string-encoding trade-off.
Trait Implementations§
Source§impl Clone for ImporterInput
impl Clone for ImporterInput
Source§fn clone(&self) -> ImporterInput
fn clone(&self) -> ImporterInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more