pub struct Html5everParser;Expand description
HTML5 spec-compliant parser using html5ever.
This parser uses the html5ever crate for spec-compliant HTML5 parsing. It handles malformed HTML gracefully using the HTML5 error recovery algorithm.
§Example
use scrape_core::{Html5everParser, Parser};
let parser = Html5everParser;
let document = parser.parse("<html><body><h1>Hello</h1></body></html>").unwrap();
assert!(document.root().is_some());Trait Implementations§
Source§impl Clone for Html5everParser
impl Clone for Html5everParser
Source§fn clone(&self) -> Html5everParser
fn clone(&self) -> Html5everParser
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Html5everParser
impl Debug for Html5everParser
Source§impl Default for Html5everParser
impl Default for Html5everParser
Source§fn default() -> Html5everParser
fn default() -> Html5everParser
Returns the “default value” for a type. Read more
Source§impl Parser for Html5everParser
impl Parser for Html5everParser
Source§fn parse_with_config(
&self,
html: &str,
config: &ParseConfig,
) -> ParseResult<Document>
fn parse_with_config( &self, html: &str, config: &ParseConfig, ) -> ParseResult<Document>
Parses HTML with the given configuration. Read more
impl Copy for Html5everParser
Auto Trait Implementations§
impl Freeze for Html5everParser
impl RefUnwindSafe for Html5everParser
impl Send for Html5everParser
impl Sync for Html5everParser
impl Unpin for Html5everParser
impl UnwindSafe for Html5everParser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more