-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion: Investigate Into
or TryInto
impl to convert our Segments into the strong typed Segments in [hl7](https://docs.rs/hl7/0.0.2/hl7/) crate
#29
Comments
What if we removed all the MSH specific stuff from the main library, but added an example of how to 'wrap' the library to produce a strongly typed segment in a consuming app? MSH would be a good example (as everyone uses it) and also helps confirm the API is workable from the outside. Thoughts? |
Thats kind of what i did in #31 - you can still call |
I have no desire to impinge on the other library, given it provides lovely rich fully typed segments etc and I'm not going there. If the two libraries end up working together well that's awesome, but not currently on my radar. |
Gotcha, |
Into
or TryInto
impl to convert our Segments into the strong typed Segments in [hl7](https://docs.rs/hl7/0.0.2/hl7/) crate
Agreed. The feature mechanisms is a very nice way to expose additional functionality while keeping the core lib clean and minimally opinionated. |
Querying into the MSH doesn't work well due to constraints around running iterators and ownership required to index into the fields - i tried a match pattern, its pretty gross.
What if we keep the MSH data structure as a
GenericSegment
but implement functional accessors to the well-known fields? Separators would move to theMessage
struct to be referenced or copied (its bytes) by its segments, and then every data element is consistent in both structure and impl. Thoughts?The text was updated successfully, but these errors were encountered: