Struct select::node::Node

source ·
pub struct Node<'a> { /* private fields */ }
Expand description

A single node of an HTML document. Nodes may be HTML elements, comments, or text nodes.

Implementations§

Create a Node referring to the indexth Node of a document.

Get the index of this Node in its Document.

Obtain the inner representation of this Node.

Get the text node, HTML element, or comment from a Node.

Get the name of a Node if it is an HTML element, or None otherwise.

Get the value of the attribute name from a Node representing a HTML element.

Get an iterator over the names and values of attributes of the Element. Returns an empty iterator for non Element nodes.

Get the combined textual content of a Node and all of its children.

Serialize a Node to an HTML string.

Serialize a Node’s children to an HTML string.

Search for Nodes fulfilling predicate in the descendants of a Node.

Evaluate a predicate on this Node.

Get the text of a text Node, or None if the node is not text.

Get the text of a comment Node, or None if the node is not a comment.

Construct an iterator over a Node’s child Nodes.

Construct an iterator over a Node’s descendant (transitive children) Nodes.

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
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Take the serializer and call its methods to serialize this type. The type will dictate which methods are called and with what parameters. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.