Enum html_parser::DomVariant
source · pub enum DomVariant {
Document,
DocumentFragment,
Empty,
}
Expand description
Document, DocumentFragment or Empty
Variants§
Document
This means that the parsed html had the representation of an html document. The doctype is optional but a document should only have one root node with the name of html. Example:
<!doctype html>
<html>
<head></head>
<body>
<h1>Hello world</h1>
</body>
</html>
DocumentFragment
A document fragment means that the parsed html did not have the representation of a document. A fragment can have multiple root children of any name except html, body or head. Example:
<h1>Hello world</h1>
Empty
An empty dom means that the input was empty
Trait Implementations§
source§impl Clone for DomVariant
impl Clone for DomVariant
source§fn clone(&self) -> DomVariant
fn clone(&self) -> DomVariant
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DomVariant
impl Debug for DomVariant
source§impl PartialEq<DomVariant> for DomVariant
impl PartialEq<DomVariant> for DomVariant
source§fn eq(&self, other: &DomVariant) -> bool
fn eq(&self, other: &DomVariant) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for DomVariant
impl Serialize for DomVariant
impl StructuralPartialEq for DomVariant
Auto Trait Implementations§
impl RefUnwindSafe for DomVariant
impl Send for DomVariant
impl Sync for DomVariant
impl Unpin for DomVariant
impl UnwindSafe for DomVariant
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