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 moreSource§impl Debug for ImporterInput
impl Debug for ImporterInput
Source§impl<'de> Deserialize<'de> for ImporterInput
impl<'de> Deserialize<'de> for ImporterInput
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ImporterInput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ImporterInput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ImporterInput
impl Serialize for ImporterInput
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 ImporterInput
impl RefUnwindSafe for ImporterInput
impl Send for ImporterInput
impl Sync for ImporterInput
impl Unpin for ImporterInput
impl UnsafeUnpin for ImporterInput
impl UnwindSafe for ImporterInput
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.