Skip to main content

astral_html/
lib.rs

1//! A high-performance HTML parser designed for document traversal.
2//!
3//! [`Reader`] yields tokens in source order and selects HTML text states.
4//! [`Tokenizer`] gives callers explicit control over those states. [`Document`]
5//! retains lexical element scopes for repeated queries, with configurable [`Limits`].
6//!
7//! Input must already be decoded UTF-8. Unchanged strings borrow from that input.
8//! The parser does not implement browser tree construction.
9
10mod document;
11mod entities;
12mod entities_data;
13mod reader;
14mod tokenizer;
15
16pub use document::{Document, Element, Error, Limits};
17pub use entities::{decode, normalize};
18pub use reader::Reader;
19pub use tokenizer::{Attribute, Doctype, State, Tag, Token, Tokenizer};