Struct tl::HTMLTag[][src]

pub struct HTMLTag<'a> { /* fields omitted */ }

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]

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

impl<'a> Clone for HTMLTag<'a>[src]

impl<'a> Debug for HTMLTag<'a>[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.