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 Freeze for NodeType
impl RefUnwindSafe for NodeType
impl Send for NodeType
impl Sync for NodeType
impl Unpin for NodeType
impl UnwindSafe for NodeType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more