-
Notifications
You must be signed in to change notification settings - Fork 20
Export the parser for direct usage #54
Comments
I found Transport and attempted to implement it for tokio::net::UnixStream, but it gets pretty frustrating to deal with non async functions in async contexts... especially when Transport requires you to write (which would be async under tokio) and return something that can be read from. Having the parse_response function exported would let libraries handle reading and writing and simply defer to this package for the encoding and decoding. |
Yes, I'm definitely interested in adding async support provided that it is runtime-independent, so feel free to do the necessary design work and open a PR. |
Unfortunately, being new to Rust, I have no idea what a good async API would look like here. Maybe adding an AsyncTransport type? Just exposing a function to parse the response into a value would do everything I need... and it already exists, just not exported. It also lines up with write_to_xml as the other half of that equation. |
I’d be happy to put the work in to code it, but I’d like to avoid wasting a bunch of time designing and coding an API that isn’t idiomatic which seems likely given my newness to the language. |
I've been working with this package for serialization and deserialization over an scgi transport, but that means I need to serialize and deserialize to something other than http. Thankfully, write_to_xml is implemented when http is disabled, but there's no way that I could currently find to deserialize from an xml document without using the http transport because the parser package doesn't appear to be exported.
The text was updated successfully, but these errors were encountered: