Skip to main content

Module path_template

Module path_template 

Source
Expand description

§PathTemplate

A config field naming a write destination — where a value lands in the message context — expressed as JSONLogic.

Split from Template because a destination needs a different resolved form than a value does. Every write in this crate goes through the *_parts tree walkers, which take a pre-split &[Arc<str>]; the dotted string is carried alongside because Change::path records it on the audit trail. Splitting per write cost measurable throughput on the map hot path, which is why the split has always been precomputed at engine construction.

That precompute is preserved exactly: a destination authored the static way — "data.output" — folds to a constant, and its (dotted, parts) pair is computed once at compile time and handed back as two refcount bumps. Only a destination that actually reads the message pays to split per write.

Structs§

ContextRoot
Rooted at the whole message context: the authored path names its own root, as in data.user.name, metadata.progress or temp_data.i.
DataRoot
Rooted inside data: the authored "orders" means data.orders. What parse_json, parse_xml, publish_json and publish_xml call target.
ParamCtx
What a built-in needs to resolve its parameters from inside an arena scope.
PathTemplate
A config field naming a write destination, expressed as JSONLogic.

Traits§

PathRoot
Where a resolved path string is rooted.

Type Aliases§

ResolvedPath
A resolved write destination: the dotted path, and its pre-split parts.