wokket / rust-hl7

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

Nightly builds removed NoneError #2

Closed sempervictus closed 3 years ago

sempervictus commented 3 years ago

As of https://github.com/rust-lang/rust/pull/85482, Rust nightly does not include the original try_trait bit including NoneError. Is there any chance you might have time to convert the implementation to current try_trait v2 mechanisms or possibly even stable builds? Thanks

wokket commented 3 years ago

I'll have a look when I get a chance, but this was never really a serious library. Is this request because you were hoping to use the library, or just trying to tidy up the ecosystem?

Ta

sempervictus commented 3 years ago

Looking at the two libs available, choice is between lots of tedious and static Impls for the structs defined in the "other lib" or working out some sort of typing translation for your approach to produce differentiated structs (i come from Ruby and C so have a penchant for the dynamic stuff with a good comprehension of what happens lower-down, and being a glutton for punishment am trying to learn to do the dynamic bits better in Rust). Neither lib seems quite production-grade, but HL7 data flows are growing every day, and the bloody format seems to have no intention of dying. There are enough absurd implementations in various languages out there to result in hospitals burning literally tons of money looking at them, and often-enough making their own for their specific extraction needs. Bringing either Rust lib to the point of being consistent and robust in data types seems like "the right thing to do" (at least so that when i end up in a hospital bed they're not confusing my telemetry for someone else').

wokket commented 3 years ago

Gotcha, spoken like someone who's spent plenty of time in healthcare ;)

I'll try and have a look tonight, but fair warning I was building this to help learn the language too 👍

sempervictus commented 3 years ago

Too much and not enough - i'm a security architect, pretty sure i've lost the ability to have nightmares from desensitization. Thanks for any progress you could make toward something buildable, the more i look at my current use case, the more it looks like i actually need a dynamic structure vs the static ones defined elsewhere. I have a naive reader mostly working, but its only for the fields i need and full-message only since MSH has separators between and inside other fields.

wokket commented 3 years ago

I've just published 0.2.1 to crates mate, let me know how it goes for you 👍

sempervictus commented 3 years ago

Thank you! Will start grokking shortly.