[][src]Enum html_parser::DomVariant

pub enum DomVariant {
    Document,
    DocumentFragment,
    Empty,
}

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

impl Debug for DomVariant[src]

impl PartialEq<DomVariant> for DomVariant[src]

impl Serialize for DomVariant[src]

impl StructuralPartialEq for DomVariant[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.