Skip to main content

Crate webui_handler

Crate webui_handler 

Source
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 with data: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§

BoundaryId
Integer handle for a compile-time streaming boundary.
BufferSink
Collects response bytes for a host that owns its own transport.
RenderOptions
Options controlling how the handler renders a protocol.
SessionOptions
Owned per-response configuration, so a session outlives its caller’s strings.
StreamingBoundaryError
Boxed payload for HandlerError::StreamingBoundary.
StreamingResponse
A host-controlled progressive HTML response.
StreamingSession
A progressive HTML response a foreign host drives one call at a time.
WebUIHandler
The main WebUI handler that processes protocols and renders them.

Enums§

BoundaryMode
Whether a committed boundary may receive later state records.
HandlerError
Error types for the WebUI handler.

Constants§

STATE_INJECT_KEY
Reserved top-level state key carrying host-supplied boundary HTML.

Traits§

FlushWriter
A response writer that can hand buffered bytes to its transport immediately.
ResponseWriter
Interface for writing rendered output

Functions§

encode_safe
Minimal HTML escaper for the 6 XSS-critical characters (& < > " ' /). Returns Cow::Borrowed when no escaping is needed (zero allocation on the happy path), Cow::Owned when any character had to be replaced.

Type Aliases§

Result