pub struct HtmlParser { /* private fields */ }Expand description
HTML Parser
Implementations§
Source§impl HtmlParser
impl HtmlParser
Sourcepub fn parse_with_encoding(bytes: &[u8], declared_charset: Option<&str>) -> Self
pub fn parse_with_encoding(bytes: &[u8], declared_charset: Option<&str>) -> Self
Parse with encoding detection
Sourcepub fn select(&self, selector: &str) -> Vec<ElementRef<'_>>
pub fn select(&self, selector: &str) -> Vec<ElementRef<'_>>
Select elements
Sourcepub fn select_first(&self, selector: &str) -> Option<ElementRef<'_>>
pub fn select_first(&self, selector: &str) -> Option<ElementRef<'_>>
Select the first element
Sourcepub fn attr(&self, selector: &str, attr: &str) -> Option<String>
pub fn attr(&self, selector: &str, attr: &str) -> Option<String>
Get an attribute of an element
Sourcepub fn inner_html(&self, selector: &str) -> Option<String>
pub fn inner_html(&self, selector: &str) -> Option<String>
Get the inner HTML of an element
Auto Trait Implementations§
impl Freeze for HtmlParser
impl !RefUnwindSafe for HtmlParser
impl !Send for HtmlParser
impl !Sync for HtmlParser
impl Unpin 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