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]

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

Returns the Element referenced by self.

Returns an iterator over descendent elements matching a selector.

Returns the HTML of this element.

Returns the inner HTML of this element.

Returns an iterator over descendent text nodes.

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

Returns the value of this node.

Returns the ID of this node.

Returns a reference to this node's parent.

Returns a reference to this node's previous sibling.

Returns a reference to this node's next sibling.

Returns a reference to this node's first child.

Returns a reference to this node's last child.

Returns true if this node has siblings.

Returns true if this node has children.

Returns an iterator over this node's ancestors.

Returns an iterator over this node's previous siblings.

Returns an iterator over this node's next siblings.

Returns an iterator over this node's children.

Returns an iterator over this node's first children.

Returns an iterator over this node's last children.

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.

Returns whether this element matches :empty. Read more

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

Add flags to the element. See the ElementFlags docs for details. Read more

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

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

Formats the value using the given formatter.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

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

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

This method tests for !=.

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

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

The resulting type after dereferencing

The method called to dereference a value