rust-encoding
rust-encoding copied to clipboard
How to Reset a RawDecoder
I'm current working on this issue:
https://github.com/servo/servo/issues/13234
To support streaming, I need to use RawDecoder provided by rust-encoding. I add an instance of RawDecoder to TextDecoder, make decode method use interface by RawDecoder. However I found no way to 'reset' the RawDecoder, that is, clear raw decoder's current state and unprocessed buffer. Is that can be done?
Try RawDecoder::from_self method.