html5ever
html5ever copied to clipboard
TreeSink requires `Tendril<UTF8, NonAtomic>`?
trafficstars
Is there a reason that we can't implement TreeSink using Atomic Tendrils? I'm trying to use an HTML library built on top of html5ever in a future and it seems that I am unable to because of StrTendril being !Send. I tried swapping out the Tendril used by the tree builder to be Atomic but it seems that once I do that I can no longer implement TreeSink.
Do you have a code sample that demonstrates what you mean?
A lot of functions and types used in TreeSink use non-atomic Tendrils, like NodeOrText or the function create_comment. However, I don't think parsing in a future is a good idea since parsing usually takes milliseconds.