pub struct HtmlWalker<'a> {
pub nodes: &'a [HtmlNode],
pub index: usize,
/* private fields */
}
Fields§
§nodes: &'a [HtmlNode]
§index: usize
Implementations§
Source§impl<'a> HtmlWalker<'a>
impl<'a> HtmlWalker<'a>
pub fn index(&self) -> usize
pub fn walk(&mut self)
pub fn jump_to_close(&mut self)
pub fn done(&self) -> bool
Sourcepub fn find_attr_lc(&self, flc: LiveId) -> Option<&'a str>
pub fn find_attr_lc(&self, flc: LiveId) -> Option<&'a str>
Returns the first attribute of the currently-opened Html tag
whose key matches the given flc
LiveId, which should be all lowercase.
Matching is done after converting all attribute keys to lowercase.
pub fn while_attr_lc(&mut self) -> Option<(LiveId, &'a str)>
Sourcepub fn find_attr_nc(&self, fnc: LiveId) -> Option<&'a str>
pub fn find_attr_nc(&self, fnc: LiveId) -> Option<&'a str>
Returns the first attribute of the currently-opened Html tag
whose key matches the given fnc
LiveId, which is case-sensitive.
Matching is done in a case-sensitive manner.
pub fn find_text(&self) -> Option<&'a str>
pub fn find_tag_text(&self, tag: LiveId) -> Option<&'a str>
pub fn text(&self) -> Option<&'a str>
pub fn text_is_all_ws(&self) -> bool
pub fn open_tag_lc(&self) -> Option<LiveId>
pub fn open_tag_nc(&self) -> Option<LiveId>
pub fn open_tag(&self) -> Option<(LiveId, LiveId)>
pub fn close_tag_lc(&self) -> Option<LiveId>
pub fn close_tag_nc(&self) -> Option<LiveId>
pub fn close_tag(&self) -> Option<(LiveId, LiveId)>
Auto Trait Implementations§
impl<'a> Freeze for HtmlWalker<'a>
impl<'a> RefUnwindSafe for HtmlWalker<'a>
impl<'a> Send for HtmlWalker<'a>
impl<'a> Sync for HtmlWalker<'a>
impl<'a> Unpin for HtmlWalker<'a>
impl<'a> UnwindSafe for HtmlWalker<'a>
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