Struct select::document::Document [] [src]

pub struct Document {
    pub nodes: Vec<Raw>,
}

An HTML document.

Fields

nodes: Vec<Raw>

Methods

impl Document
[src]

fn find<'a, P: Predicate>(&'a self, p: P) -> Selection<'a>

Returns a Selection containing nodes passing the given predicate p.

fn nth(&self, n: usize) -> Option<Node>

Returns the nth node of the document as a Some(Node), indexed from 0, or None if n is greater than or equal to the number of nodes.

Trait Implementations

impl PartialEq for Document
[src]

fn eq(&self, __arg_0: &Document) -> bool

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

fn ne(&self, __arg_0: &Document) -> bool

This method tests for !=.

impl Debug for Document
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for Document
[src]

fn clone(&self) -> Document

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl From<StrTendril> for Document
[src]

fn from(tendril: StrTendril) -> Document

Parses the given StrTendril into a Document.

impl<'a> From<&'a str> for Document
[src]

fn from(str: &str) -> Document

Parses the given &str into a Document.