Enum scraper::node::Node
[−]
[src]
pub enum Node { Document, Fragment, Doctype(Doctype), Comment(Comment), Text(Text), Element(Element), }
An HTML node.
Variants
Document
The document root.
Fragment
The fragment root.
Doctype(Doctype)
A doctype.
Comment(Comment)
A comment.
Text(Text)
Text.
Element(Element)
An element.
Methods
impl Node
[src]
fn is_document(&self) -> bool
Returns true if node is the document root.
fn is_fragment(&self) -> bool
Returns true if node is the fragment root.
fn is_doctype(&self) -> bool
Returns true if node is a doctype.
fn is_comment(&self) -> bool
Returns true if node is a comment.
fn is_text(&self) -> bool
Returns true if node is text.
fn is_element(&self) -> bool
Returns true if node is an element.
fn as_doctype(&self) -> Option<&Doctype>
Returns self as a doctype.
fn as_comment(&self) -> Option<&Comment>
Returns self as a comment.
fn as_text(&self) -> Option<&Text>
Returns self as text.
fn as_element(&self) -> Option<&Element>
Returns self as an element.
Trait Implementations
impl Eq for Node
[src]
impl PartialEq for Node
[src]
fn eq(&self, __arg_0: &Node) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Node) -> bool
This method tests for !=
.
impl Clone for Node
[src]
fn clone(&self) -> Node
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