rust-hl7
rust-hl7 copied to clipboard
Move `query()` funcs into separate structs
As part of moving to a 'toolbox' approach rather than all-in-one framework move the querying into it's own area (like EscapeSequence).
JsonPath uses a Selector struct with new() and find() funcs which I quite like.
Still trying to make sense of what benefit this brings, other than code clarity and a refactor opportunity.
I haven't done any serious work here yet, but that pretty much sums it up... hoping for :
- Reduce amount of code in
Messageetc for clarity/easier modification - Separation of Concerns
- Keep query tests all together
- Better fit 'toolkit' approach
- More opportunity to optimise perf by caching data in the selector (like the regexes in
EscapeSequence)