pub enum NodeType {
Element,
Attribute,
Text,
Comment,
Doctype,
Fragment,
Block,
}
Expand description
Type of the node
Variants
Element
A HTMLElement tag, with optional children and attributes. Potentially selfclosing. Any tag name is valid.
Attribute
Attributes of opening tags. Every attribute is itself a node.
Text
Quoted text. It’s planned to support unquoted text as well using span start and end, but that currently only works with nightly rust
Comment
Comment: <!-- "comment" -->
, currently has the same restrictions as
Text
(comment needs to be quoted)
Doctype
Doctype declaration: <!DOCTYPE html>
(case insensitive), html
is the
node value in this case
Fragment
Fragment: <></>
Block
Arbitrary rust code in braced {}
blocks
Trait Implementations
impl StructuralPartialEq for NodeType
Auto Trait Implementations
impl RefUnwindSafe for NodeType
impl Send for NodeType
impl Sync for NodeType
impl Unpin for NodeType
impl UnwindSafe for NodeType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more