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.

Important traits for Select<'a, 'b>

Returns an iterator over descendent elements matching a selector.

Returns the HTML of this element.

Returns the inner HTML of this element.

Important traits for Text<'a>

Returns an iterator over descendent text nodes.

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

Important traits for &'a mut R

Returns the value of this node.

Returns the parent of this node.

Returns the previous sibling of this node.

Returns the next sibling of this node.

Returns the first child of this node.

Returns the last child of this node.

Returns true if this node has siblings.

Returns true if this node has children.

Important traits for Ancestors<'a, T>

Returns an iterator over ancestors.

Important traits for PrevSiblings<'a, T>

Returns an iterator over previous siblings.

Important traits for NextSiblings<'a, T>

Returns an iterator over next siblings.

Important traits for FirstChildren<'a, T>

Returns an iterator over first children.

Important traits for LastChildren<'a, T>

Returns an iterator over last children.

Important traits for Children<'a, T>

Returns an iterator over children.

Important traits for Traverse<'a, T>

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

Important traits for Descendants<'a, T>

Returns an iterator over this node and its descendants.

Trait Implementations

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

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

Skips non-element nodes

Skips non-element nodes

Skips non-element nodes

Skips non-element nodes

Empty string for no namespace

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

Whether this element is a link.

Converts self into an opaque representation.

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

Returns the assigned element this element is assigned to. Read more

Returns whether this element should ignore matching nth child selector. Read more

Return true if we want to stop lookup ancestor of the current element while matching complex selectors with descendant/child combinator. Read more

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

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

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

Formats the value using the given formatter. Read more

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.

Dereferences the value.

Auto Trait Implementations

impl<'a> !Send for ElementRef<'a>

impl<'a> !Sync for ElementRef<'a>