Enum tl::Node[][src]

pub enum Node<'a> {
    Tag(HTMLTag<'a>),
    Raw(Bytes<'a>),
    Comment(Bytes<'a>),
}
Expand description

An HTML Node

Variants

Tag(HTMLTag<'a>)

Tuple Fields

0: HTMLTag<'a>

A regular HTML element/tag

Raw(Bytes<'a>)

Tuple Fields

0: Bytes<'a>

Raw text (no particular HTML element)

Comment(Bytes<'a>)

Tuple Fields

0: Bytes<'a>

Comment ()

Implementations

Returns the inner text of this node

Returns the inner HTML of this node

Returns an iterator over subnodes (“children”) of this HTML tag, if this is a tag

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 and return a handle to the node

Tries to coerce this node into a HTMLTag variant

Tries to coerce this node into a comment, returning the text

Tries to coerce this node into a raw text node, returning the text

“Raw text nodes” are nodes that are not HTML tags, but just text

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.