Open tliron opened 6 days ago
This sounds like a good idea to me.
The reason is mostly I haven't had the need of it nor the idea. A PR is welcome, otherwise I'll add it when I'm cleaning issues :)
Thanks for the feedback! I'm busy with some other things right now but will update here if I start working on it.
BTW, might be worth pointing out that streaming directly from a file will likely result in worse performance than reading the whole file into a string and then parsing it. See similar discussion for serde-json. They ended up documenting this potential issue, which I think is a great idea. We can just copy that documentation verbatim for Saphyr.
It doesn't mean it's still not useful, for example for generic programs that allow for parsing YAML from arbitrary stream sources (like mine).
The current API supports char iterators, but why not io::Read? This make Saphyr difficult to use in many environments.
If the maintainers are interested in this feature I can attempt a PR.