pub struct HtmlParser { /* private fields */ }Expand description
HTML parser for loading and parsing web content
Implementations§
Source§impl HtmlParser
impl HtmlParser
Sourcepub async fn load_from_url(
&self,
url: &str,
) -> Result<PageLoadResult, Box<dyn Error>>
pub async fn load_from_url( &self, url: &str, ) -> Result<PageLoadResult, Box<dyn Error>>
Load HTML content from a URL
Sourcepub fn parse_html(&self, html: &str, base_url: Option<&str>) -> PageLoadResult
pub fn parse_html(&self, html: &str, base_url: Option<&str>) -> PageLoadResult
Parse HTML content directly
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HtmlParser
impl !RefUnwindSafe for HtmlParser
impl Send for HtmlParser
impl Sync for HtmlParser
impl Unpin for HtmlParser
impl UnsafeUnpin for HtmlParser
impl !UnwindSafe for HtmlParser
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