Expand description
§asm_tl
asm_tl is a blazingly fast HTML parser written in Rust and Assembly.
Supported assembly targets:
x86_64-unknown-linux-*aarch64-unknown-linux-*riscv64gc-unknown-linux-*x86_64-pc-windows-msvc
Add it to your Cargo.toml:
asm_tl = "0.2"§Usage
Use asm_tl::parse with the default parser options:
ⓘ
let dom = asm_tl::parse("<div id=\"app\">Hello</div>", asm_tl::ParserOptions::default())?;
let parser = dom.parser();
let app = dom.get_element_by_id("app").unwrap().get(parser).unwrap();
assert_eq!(app.inner_text(parser), "Hello");Enable ID or class tracking when you need fast lookup tables:
ⓘ
let options = asm_tl::ParserOptions::default()
.track_ids()
.track_classes();§Features
__INTERNALS_DO_NOT_USE: exposes internal modules for fuzzing and benchmarking.
§Provenance
This crate is a fork of rustedbytes-tl,
modified to add parsing in Assembly and other improvements.
§License
This project is licensed under the MIT license.
Re-exports§
pub use errors::ParseError;
Modules§
- errors
- Errors that occur throughout the crate
- inline
- Inline data structures
- queryselector
- Query selector API
Structs§
- Attributes
- Stores all attributes of an HTML tag, as well as additional metadata such as
idandclass - Bytes
- A storage type for raw bytes, used by the parser
- Children
- A thin wrapper around the children of
HTMLTag - Children
Mut - A thin mutable wrapper around the children of
HTMLTag - HTMLTag
- Represents a single HTML element
- Node
Handle - A detached, external handle to a HTML node, originally obtained from a Parser
- Parser
- The main HTML parser
- Parser
Options - Options for the HTML Parser
- VDom
- VDom represents a Document Object Model
- VDom
Guard - A RAII guarded version of VDom
Enums§
- HTML
Version - HTML Version ()
- Node
- An HTML Node
Functions§
- parse
- Parses the given input string
- parse_
owned ⚠ - Parses the given input string and returns an owned, RAII guarded DOM
- parse_
query_ selector - Parses a query selector
Type Aliases§
- Class
Vec - Inline class vector
- Inner
Node Handle - The inner type of a NodeHandle, used to represent an index into the tags table
- RawAttributes
Map - The type of map for “raw” attributes
- RawChildren
- The type of vector for children of an HTML tag
- Tree
- A list of HTML nodes