Expand description
WebUI Handler implementation for Rust.
This crate provides functionality to process and render WebUI protocols into final HTML output based on provided data.
Re-exports§
pub use route_handler::Protocol;
Modules§
- css_
module - Shared helpers for emitting CSS module definitions as
<script type="importmap">tags withdata:text/css,…URIs. - plugin
- Handler plugin trait and built-in plugin implementations.
- route_
handler - Route component inventory management for incremental route rendering.
- route_
matcher - Iterative path template matcher for server-side route resolution.
Structs§
- Boundary
Id - Integer handle for a compile-time streaming boundary.
- Buffer
Sink - Collects response bytes for a host that owns its own transport.
- Render
Options - Options controlling how the handler renders a protocol.
- Session
Options - Owned per-response configuration, so a session outlives its caller’s strings.
- Streaming
Boundary Error - Boxed payload for
HandlerError::StreamingBoundary. - Streaming
Response - A host-controlled progressive HTML response.
- Streaming
Session - A progressive HTML response a foreign host drives one call at a time.
- WebUI
Handler - The main WebUI handler that processes protocols and renders them.
Enums§
- Boundary
Mode - Whether a committed boundary may receive later state records.
- Handler
Error - Error types for the WebUI handler.
Constants§
- STATE_
INJECT_ KEY - Reserved top-level state key carrying host-supplied boundary HTML.
Traits§
- Flush
Writer - A response writer that can hand buffered bytes to its transport immediately.
- Response
Writer - Interface for writing rendered output
Functions§
- encode_
safe - Minimal HTML escaper for the 6 XSS-critical characters
(
& < > " ' /). ReturnsCow::Borrowedwhen no escaping is needed (zero allocation on the happy path),Cow::Ownedwhen any character had to be replaced.