Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Reset a RawDecoder #107

Open
yodalee opened this issue Nov 16, 2016 · 1 comment
Open

How to Reset a RawDecoder #107

yodalee opened this issue Nov 16, 2016 · 1 comment

Comments

@yodalee
Copy link

yodalee commented Nov 16, 2016

I'm current working on this issue:
servo/servo#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?

@lifthrasiir
Copy link
Owner

Try RawDecoder::from_self method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants