pub enum NodeType {
Show 30 variants
Html,
Head,
Style,
Link,
Script,
Meta,
Title,
Body,
H1,
H2,
H3,
H4,
H5,
H6,
P,
Div,
Strong,
Em,
A,
Ul,
Ol,
Li,
Pre,
Code,
Hr,
Br,
Blockquote,
Text,
Comment,
Unknown(String),
}Expand description
Represents the different types of HTML elements that the library supports.
Variants§
Html
Document root (html).
Head
Document metadata container (head).
Style
Embedded CSS (style).
Link
External resource link (link).
Script
Embedded script (script).
Meta
Metadata (meta).
Title
Document title (title).
Body
Document body (body).
H1
Level-one heading (h1).
H2
Level-two heading (h2).
H3
Level-three heading (h3).
H4
Level-four heading (h4).
H5
Level-five heading (h5).
H6
Level-six heading (h6).
P
Paragraph (p).
Div
Generic block container (div).
Strong
Strong importance (strong).
Em
Emphasis (em).
A
Link (a).
Ul
Unordered list (ul).
Ol
Ordered list (ol).
Li
List item (li).
Pre
Preformatted block (pre).
Code
Code (code).
Hr
Thematic break (hr).
Br
Line break (br).
Blockquote
Block quotation (blockquote).
Text
Plain text content.
Comment
HTML comment.
Unknown(String)
Unsupported tag, retaining the name lowercased by the parser.
Implementations§
Source§impl NodeType
impl NodeType
Sourcepub fn is_special_tag(&self) -> bool
pub fn is_special_tag(&self) -> bool
Returns whether this tag affects descendant list or quote formatting.
Sourcepub fn from_tag_str(input: &str) -> Self
pub fn from_tag_str(input: &str) -> Self
Converts an HTML tag name into its supported node type.