Skip to main content

Module send

Module send 

Source
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§

BailOutHandler
Sendable boxed closure for handling a graceful bail-out.
CommentHandler
Sendable boxed closure for handling HTML comments.
DoctypeHandler
Sendable boxed closure for handling the document type declaration.
DocumentContentHandlers
DocumentContentHandlers for Sendable HtmlRewriters.
Element
Element for Sendable HtmlRewriters.
ElementContentHandlers
ElementContentHandlers for Sendable HtmlRewriters.
ElementHandler
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.
EndTagHandler
Sendable boxed closure for handling end tags.
HtmlRewriter
An HtmlRewriter that implements Send.
RewriteStrSettings
RewriteStrSettings for Sendable HtmlRewriters.
Settings
Settings for Sendable HtmlRewriters.
TextHandler
Sendable boxed closure for handling text chunks](TextChunk) present the HTML.