wokket / rust-hl7

Learning rust by playing with a HL7 parser. Use for real at your own risk!
18 stars 8 forks source link

Replace string indexer with normal function. #15

Closed wokket closed 3 years ago

wokket commented 3 years ago

Using the Index<str> trait to implement the awesome path based querying support doesn't make a lot of sense to me.

I'm proposing that we:

  1. move the index<'str> code into it's own method(s), and

Edit, I'm going to make pushing this into a separate module a future problem for now, 2. possibly move it into it's own module within this crate.

~~JsonPath and others keep the selector/query logic separate from the data they're working on, and I like the fact that would keep the logic and tests separate, as I think there's going to have to be a lot of tests/docs to go with this. ~~

I think I like the naming of creating a Selector, which can be used to query() or query_path a Message/segment etc but am option to better options.