You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing examples of how to parse and decode bytes from io::Read, but still not clear is now to do the same to have char stream (and also preferably with byte positioner). I find using chars easier for some use cases. Is there any built-in or easily accessible way to do that, or do I have to implement custom stream for that?
The text was updated successfully, but these errors were encountered:
If at all possible I would recommend against parsing directly from a io::Read as it is significantly slower than reading from an in memory buffer. If you need streaming you may want to look into using https://docs.rs/combine/4.6.2/combine/macro.decode.html and partial parsing instead, it may be easier to create an input stream that contains a &[u8], yet returns char/&str (might be a good addition to combine itself actually).
Hi!
I'm seeing examples of how to parse and decode bytes from
io::Read
, but still not clear is now to do the same to have char stream (and also preferably with byte positioner). I find using chars easier for some use cases. Is there any built-in or easily accessible way to do that, or do I have to implement custom stream for that?The text was updated successfully, but these errors were encountered: