pub enum NodeKind<'a> {
Element {
tag: &'a str,
},
Text(&'a str),
Comment(&'a str),
Doctype(&'a str),
}Expand description
What a node is — a borrowed, Copy view returned by
NodeRef::kind.
For elements, the tag name is included here; read attributes via the
NodeRef accessors (attr, attributes, classes, …).
Variants§
Element
An element, with its lower-cased tag name.
Text(&'a str)
A run of text (already entity-decoded, except inside <script>/<style>).
Comment(&'a str)
The body of an HTML comment.
Doctype(&'a str)
The body of a <!doctype …> declaration.
Trait Implementations§
impl<'a> Copy for NodeKind<'a>
impl<'a> Eq for NodeKind<'a>
Source§impl<'a> PartialEq for NodeKind<'a>
impl<'a> PartialEq for NodeKind<'a>
impl<'a> StructuralPartialEq for NodeKind<'a>
Auto Trait Implementations§
impl<'a> Freeze for NodeKind<'a>
impl<'a> RefUnwindSafe for NodeKind<'a>
impl<'a> Send for NodeKind<'a>
impl<'a> Sync for NodeKind<'a>
impl<'a> Unpin for NodeKind<'a>
impl<'a> UnsafeUnpin for NodeKind<'a>
impl<'a> UnwindSafe for NodeKind<'a>
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