Struct scraper::element_ref::ElementRef [] [src]

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

Wrapper around a reference to an element node.

This wrapper implements the Element trait from the selectors crate, which allows it to be matched against CSS selectors.

Methods

impl<'a> ElementRef<'a>
[src]

[src]

Wraps a NodeRef only if it references a Node::Element.

[src]

Returns the Element referenced by self.

[src]

Returns an iterator over descendent elements matching a selector.

[src]

Returns the HTML of this element.

[src]

Returns the inner HTML of this element.

[src]

Returns an iterator over descendent text nodes.

Methods from Deref<Target = NodeRef<'a, Node>>

[src]

Returns the value of this node.

[src]

Returns the ID of this node.

[src]

Returns a reference to this node's parent.

[src]

Returns a reference to this node's previous sibling.

[src]

Returns a reference to this node's next sibling.

[src]

Returns a reference to this node's first child.

[src]

Returns a reference to this node's last child.

[src]

Returns true if this node has siblings.

[src]

Returns true if this node has children.

[src]

Returns an iterator over this node's ancestors.

[src]

Returns an iterator over this node's previous siblings.

[src]

Returns an iterator over this node's next siblings.

[src]

Returns an iterator over this node's children.

[src]

Returns an iterator over this node's first children.

[src]

Returns an iterator over this node's last children.

[src]

Returns an iterator which traverses the subtree starting at this node.

Trait Implementations

impl<'a> Element for ElementRef<'a>
[src]

Note: will never match against non-tree-structure pseudo-classes.

[src]

[src]

Skips non-element nodes

[src]

Skips non-element nodes

[src]

Skips non-element nodes

[src]

Skips non-element nodes

[src]

[src]

[src]

Empty string for no namespace

[src]

[src]

[src]

[src]

Returns whether this element matches :empty. Read more

[src]

Returns whether this element matches :root, i.e. whether it is the root element of a document. Read more

[src]

[src]

[src]

The parent of a given pseudo-element, after matching a pseudo-element selector. Read more

impl<'a> Serialize for ElementRef<'a>
[src]

[src]

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

[src]

Formats the value using the given formatter.

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Copy for ElementRef<'a>
[src]

impl<'a> PartialEq for ElementRef<'a>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<'a> Eq for ElementRef<'a>
[src]

impl<'a> Deref for ElementRef<'a>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.