Struct tl::HTMLTag [−][src]
Represents a single HTML element
Implementations
impl<'a> HTMLTag<'a>
[src]
pub fn children(&self) -> &Vec<Rc<Node<'a>>>
[src]
Returns a vector of subnodes (“children”) of this HTML tag
pub fn name(&self) -> &Option<Bytes<'a>>
[src]
Returns the name of this HTML tag
pub fn attributes(&self) -> &Attributes<'a>
[src]
Returns attributes of this HTML tag
pub fn inner_html(&self) -> &Bytes<'a>
[src]
Returns the contained markup Equivalent to Element#innerHTML in browsers)
pub fn inner_text(&self) -> Cow<'a, str>
[src]
Returns the contained text of this element, excluding any markup Equivalent to Element#innerText in browsers) This function may not allocate memory for a new string as it can just return the part of the tag that doesn’t have markup For tags that do have more than one subnode, this will allocate memory
pub fn find_node<'b, F>(&'b self, f: &mut F) -> Option<&'b Rc<Node<'a>>> where
F: FnMut(&Rc<Node<'a>>) -> bool,
[src]
F: FnMut(&Rc<Node<'a>>) -> bool,
Calls the given closure with each tag as parameter
The closure must return a boolean, indicating whether it should stop iterating
Returning true
will break the loop
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for HTMLTag<'a>
impl<'a> !Send for HTMLTag<'a>
impl<'a> !Sync for HTMLTag<'a>
impl<'a> Unpin for HTMLTag<'a>
impl<'a> !UnwindSafe for HTMLTag<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,