Expand description
Safe Rust bindings for the litehtml HTML/CSS rendering engine.
This crate wraps the raw C FFI provided by litehtml-sys with safe,
idiomatic Rust types. Users implement the DocumentContainer trait to
provide font metrics, drawing, and resource loading, then create a
Document to parse and render HTML.
Re-exports§
pub use litehtml_sys as sys;
Modules§
- selection
- Text selection support for litehtml documents.
Structs§
- Background
Layer - Borrowed reference to a background layer from litehtml.
- Border
- Border
Radiuses - Borders
- Color
- RGBA color value.
- Color
Point - Conic
Gradient - Borrowed reference to a conic gradient from litehtml.
- Document
- A parsed HTML document. Wraps the C++
litehtml::documentand ties its lifetime to theDocumentContainerthat provides rendering callbacks. - Element
- Opaque handle to a litehtml element. Borrows from the parent
Document. - Font
Description - Borrowed reference to a font description from litehtml.
- Font
Metrics - Linear
Gradient - Borrowed reference to a linear gradient from litehtml.
- List
Marker - Borrowed reference to a list marker from litehtml.
- Media
Features - Point
- Position
- Radial
Gradient - Borrowed reference to a radial gradient from litehtml.
- Size
Enums§
- Border
Style - Color
Space - CSS gradient color interpolation space.
- Create
Error - Error returned by
Document::from_htmlwhen document creation fails. - Decoration
Thickness - CSS
text-decoration-thicknesscomputed value. - HueInterpolation
- CSS gradient hue interpolation method.
- Media
Type - Mouse
Event - Text
Decoration Style - CSS
text-decoration-stylevalues. - Text
Transform
Traits§
- Document
Container - Trait that must be implemented to provide drawing, font, and resource callbacks to the litehtml rendering engine.
Functions§
- css_
escape_ ident - Escape CSS meta-characters in an identifier for use in selectors.