[][src]Enum scraper::node::Node

pub enum Node {
    Document,
    Fragment,
    Doctype(Doctype),
    Comment(Comment),
    Text(Text),
    Element(Element),
    ProcessingInstruction(ProcessingInstruction),
}

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.

ProcessingInstruction(ProcessingInstruction)

A processing instruction.

Methods

impl Node[src]

pub fn is_document(&self) -> bool[src]

Returns true if node is the document root.

pub fn is_fragment(&self) -> bool[src]

Returns true if node is the fragment root.

pub fn is_doctype(&self) -> bool[src]

Returns true if node is a doctype.

pub fn is_comment(&self) -> bool[src]

Returns true if node is a comment.

pub fn is_text(&self) -> bool[src]

Returns true if node is text.

pub fn is_element(&self) -> bool[src]

Returns true if node is an element.

pub fn as_doctype(&self) -> Option<&Doctype>[src]

Returns self as a doctype.

pub fn as_comment(&self) -> Option<&Comment>[src]

Returns self as a comment.

pub fn as_text(&self) -> Option<&Text>[src]

Returns self as text.

pub fn as_element(&self) -> Option<&Element>[src]

Returns self as an element.

pub fn as_processing_instruction(&self) -> Option<&ProcessingInstruction>[src]

Returns self as an element.

Trait Implementations

impl Eq for Node[src]

impl Clone for Node[src]

impl PartialEq<Node> for Node[src]

impl Debug for Node[src]

Auto Trait Implementations

impl !Send for Node

impl Unpin for Node

impl !Sync for Node

impl !RefUnwindSafe for Node

impl UnwindSafe for Node

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]