pub struct EnrichmentWrapper {
pub directive_index: usize,
pub confidence: f64,
pub method: String,
pub alternatives: Vec<AlternativeWrapper>,
pub fingerprint: Option<String>,
}Expand description
Wire-format counterpart to rustledger_ops::enrichment::Enrichment.
Kept here (rather than in rustledger-ops) so the importer ABI is
self-contained — WASM importers depend on rustledger-plugin-types
and shouldn’t pull in the larger rustledger-ops graph just for an
enrichment definition. The host converts between the two shapes at
the trait boundary.
Fields§
§directive_index: usizeIndex of the directive this enrichment applies to (parallel to
EnrichedImporterOutput.entries).
confidence: f64Confidence score for the primary categorization (0.0 to 1.0).
method: StringHow the primary categorization was determined. String-encoded
to avoid pinning the CategorizationMethod enum’s exact variant
set into the wire format. Must match
CategorizationMethod::as_meta_value() in rustledger-ops:
"rule", "merchant-dict", "ml", "llm", "default",
"manual". (Note: merchant-dict uses a hyphen, not an
underscore — the host string-matches against
as_meta_value()’s output, so the wire format must agree.)
alternatives: Vec<AlternativeWrapper>Other possible categorizations, sorted by confidence descending.
fingerprint: Option<String>Stable fingerprint for deduplication, serialized as a hex string.
Trait Implementations§
Source§impl Clone for EnrichmentWrapper
impl Clone for EnrichmentWrapper
Source§fn clone(&self) -> EnrichmentWrapper
fn clone(&self) -> EnrichmentWrapper
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more