-
Notifications
You must be signed in to change notification settings - Fork 90
Streaming handlers #229
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
Streaming handlers #229
Conversation
61d1dc7 to
d5c08f9
Compare
8e6848b to
7eff224
Compare
212155d to
fc117d1
Compare
1d3911e to
6dae0c6
Compare
|
nice |
a7b897b to
7fd8c21
Compare
Known issues
|
| //! [Cloudflare Workers]: https://www.cloudflare.com/en-gb/products/cloudflare-workers/ | ||
| //! [`HtmlRewriter`]: struct.HtmlRewriter.html | ||
| //! [`rewrite_str`]: fn.rewrite_str.html | ||
| #![forbid(unsafe_code)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
Spoke to Ivan: the PR looks good to him.
Basis for cloudflare/workerd#2758
to_bytesturned into fallibleinto_bytesto guarantee that the content handlers are called only once, and to report encoding errors in the future.into_bytesusingselfbecame more performance-sensitive to the size of the token structs, so I've madeMutationsallocated lazily, assuming that majority of nodes aren't mutated.encoding_rs::Encoderwhen the output is UTF-8.