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
sourceimpl Clone for DomVariant
impl Clone for DomVariant
sourcefn clone(&self) -> DomVariant
fn clone(&self) -> DomVariant
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DomVariant
impl Debug for DomVariant
sourceimpl PartialEq<DomVariant> for DomVariant
impl PartialEq<DomVariant> for DomVariant
sourceimpl 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
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more