As far as I can see, the only API for getting a Reader is using from_str and new, both of which take a &str.
Having something like:
Reader::from_read<R: Read>(read: R)
would make it simple to pass in a File, for example, without glue code to get a &str or bytes, and passing it to the current interface.
As far as I can see, the only API for getting a
Readeris usingfrom_strandnew, both of which take a&str.Having something like:
would make it simple to pass in a
File, for example, without glue code to get a&stror bytes, and passing it to the current interface.