[][src]Enum marked::NodeData

pub enum NodeData {
    Hole,
    Document,
    DocType(DocumentType),
    Text(StrTendril),
    Comment(StrTendril),
    Elem(Element),
    Pi(ProcessingInstruction),
}

The node kind and payload data associated with that kind.

Variants

Hole

A place holder value. Used temporarily while filtering and for nodes that have been removed.

Document

The document node which contains all other nodes.

DocType(DocumentType)

The document type definition.

Character data content.

Comment(StrTendril)

A comment.

Elem(Element)

An element.

A processing instruction node.

Methods

impl NodeData[src]

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

Return Element is this is an element.

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

Return mutable Element reference if this is an element.

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

Return text (char data) if this is a text node.

pub fn as_text_mut(&mut self) -> Option<&mut StrTendril>[src]

Return mutable text (char data) reference if this is a text node.

pub fn attr<LN>(&self, lname: LN) -> Option<&StrTendril> where
    LN: Into<LocalName>, 
[src]

Return attribute value by given local attribute name, if this is an element with that attribute present.

pub fn is_elem<LN>(&self, lname: LN) -> bool where
    LN: Into<LocalName>, 
[src]

Return true if this Node is an element with the given local name.

Trait Implementations

impl Clone for NodeData[src]

impl Debug for NodeData[src]

Auto Trait Implementations

impl !RefUnwindSafe for NodeData

impl !Send for NodeData

impl !Sync for NodeData

impl Unpin for NodeData

impl UnwindSafe for NodeData

Blanket Implementations

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

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

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

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

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, 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.