Expand description
This module contains type aliases that make the HtmlRewriter safe to move between threads (have the Send bound).
The bound requires content handlers to be thread-safe, which prevents them from mutating external state without synchronization.
Rewriting is sequential, so there’s no benefit from using the Send-compatible rewriter.
Type Aliases§
- Bail
OutHandler - Sendable boxed closure for handling a graceful bail-out.
- Comment
Handler - Sendable boxed closure for handling HTML comments.
- Doctype
Handler - Sendable boxed closure for handling the document type declaration.
- Document
Content Handlers DocumentContentHandlersforSendableHtmlRewriters.- Element
ElementforSendableHtmlRewriters.- Element
Content Handlers ElementContentHandlersforSendableHtmlRewriters.- Element
Handler - Sendable boxed closure for handling elements matched by a selector.
- EndHandler
- Sendable boxed closure for handling the document end. This is called after the last chunk is processed.
- EndTag
Handler - Sendable boxed closure for handling end tags.
- Html
Rewriter - An
HtmlRewriterthat implementsSend. - Rewrite
StrSettings RewriteStrSettingsforSendableHtmlRewriters.- Settings
SettingsforSendableHtmlRewriters.- Text
Handler - Sendable boxed closure for handling text chunks](TextChunk) present the HTML.