Open yasamoka opened 2 weeks ago
Thanks for your PR! Can you please rebase on dev branch as I did changes today? I'm going to review your modifications, but the feature seems interesting :).
On it!
Done.
There’s quite a bit of code duplication between the sync and async reader implementations: there might be something we can do with macros.
I'll try to think about it on my own, but maybe we can take inspiration from other crates like surf
or reqwest
.
Hello, what was decided regarding this? I'd like to know. Thanks!
Hi, I closed the PR by deleting the dev branch, I've just restored it. Still need to see how to better manage readers without duplicating too much code.
Do let me know if I can help with something after you've thought about it.
First of all, thank you for your great work on this crate!
This PR adds support for readers that implement Tokio's
AsyncRead
andAsyncSeek
traits.My use case is determining the file format of potentially large S3 objects without having to read entire objects into memory first. A reader that implements
AsyncRead
is provided courtesy of aws_smithy_types, but forAsyncSeek
I had to implement my own wrapper on top. An example of such can be provided if needed.Adding async support required moving common functionality away from the file format readers first, then introducing async implementations of those readers in parallel with the sync versions. The commit sequence shows this step-by-step.
Please let me know if there are any changes required.