utkarshkukreti / select.rs

A Rust library to extract useful data from HTML documents, suitable for web scraping.
MIT License
959 stars 69 forks source link

Any plan to support async/await? #60

Open Folyd opened 4 years ago

Folyd commented 4 years ago

Document::from_read() only supports trait std::io::Read, hope trait futures::io::AsyncRead is in the support plan. Just wondering any plan about this, or do you need PR, maybe I can do it.

adumbidiot commented 4 years ago

Looks like it buffers everything up front when parsing. How would adding AsyncRead benefit here?

Nvm looks like its possible if you don't try to pipe everything thought the From<StrTendil> : https://docs.rs/html5ever/0.25.1/html5ever/driver/struct.Parser.html

Just seems like a bit more work I guess