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§

BoundaryDescriptor
Runtime occurrence returned when traversal suspends.
BoundaryInstanceId
Response-local runtime boundary occurrence identity.
BufferSink
Reusable byte sink for host-owned sessions.
RenderOptions
Options controlling how the handler renders a protocol.
SessionOptions
Owned per-response configuration.
SpanInstanceId
Response-local generated component span identity.
StreamStatus
Borrowed-writer result of one semantic streaming step.
StreamStep
Bytes and continuation state returned by one owned semantic step.
StreamingBoundaryError
Boxed payload for HandlerError::StreamingBoundary.
StreamingResponse
A progressive response that writes directly through a FlushWriter.
StreamingSession
A progressive response owned independently of any Rust borrow.
WebUIHandler
The main WebUI handler that processes protocols and renders them.

Enums§

BoundaryKey
Valid evaluated key for a repeated boundary declaration.
BoundaryMode
Whether a committed occurrence may receive later state updates.
HandlerError
Error types for the WebUI handler.
StreamingState
Borrowed or owned JSON state supplied to a streaming step.

Constants§

MAX_BOUNDARY_OCCURRENCES
Maximum runtime boundary occurrences in one response.
MAX_CONTINUATION_DEPTH
Maximum continuation frames retained by one response.
MAX_KEYED_INSTANCES
Maximum keyed runtime occurrences tracked for uniqueness.
MAX_SPAN_NESTING
Maximum nested unfinished component spans.
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