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 moreSource§impl Debug for EnrichmentWrapper
impl Debug for EnrichmentWrapper
Source§impl<'de> Deserialize<'de> for EnrichmentWrapper
impl<'de> Deserialize<'de> for EnrichmentWrapper
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EnrichmentWrapper, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EnrichmentWrapper, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for EnrichmentWrapper
impl Serialize for EnrichmentWrapper
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for EnrichmentWrapper
impl RefUnwindSafe for EnrichmentWrapper
impl Send for EnrichmentWrapper
impl Sync for EnrichmentWrapper
impl Unpin for EnrichmentWrapper
impl UnsafeUnpin for EnrichmentWrapper
impl UnwindSafe for EnrichmentWrapper
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.