pub enum HandlerError {
Show 17 variants
Rendering(String),
InvalidState(String),
Invariant(String),
MissingFragment(String),
MissingData(String),
TypeError(String),
Protocol(ProtocolError),
Evaluation(String),
Io(Error),
Writer(String),
PluginData(String),
ClientDisconnected,
StreamTimeout,
StreamingBoundary(Box<StreamingBoundaryError>),
MissingStreamingBodyEnd,
MissingStreamingHeadStart {
before: &'static str,
},
DuplicateStreamingHeadStart,
}Expand description
Error types for the WebUI handler.
Variants§
Rendering(String)
InvalidState(String)
Host-supplied state JSON could not be parsed or validated.
This is a caller input error, not a render failure. Bindings map it to
their own state-error type, so it must stay distinguishable from
HandlerError::Rendering without inspecting the message text.
Invariant(String)
MissingFragment(String)
MissingData(String)
TypeError(String)
Protocol(ProtocolError)
Evaluation(String)
Io(Error)
Writer(String)
PluginData(String)
ClientDisconnected
The HTTP client disconnected before the render completed.
Streaming ResponseWriter implementations return this from
write() once their channel/socket is closed, so the handler
can abort the render rather than do CPU work that has nowhere
to go. Allocation-free (the variant carries no payload).
StreamTimeout
The streaming writer’s flush exceeded its configured deadline.
Indicates a slow/unresponsive consumer (slow-loris client,
stuck proxy, etc.). The render thread is freed; downstream
telemetry should distinguish this from ClientDisconnected
so ops can alert on slow-client attacks.
StreamingBoundary(Box<StreamingBoundaryError>)
A streaming-boundary signal was malformed or arrived out of order.
The payload is boxed so this cold, streaming-only variant does not
widen HandlerError — and therefore Result<(), HandlerError>
threaded through the entire hot legacy render path — with two inline
Strings.
MissingStreamingBodyEnd
A streaming render ended without its structural body_end signal.
MissingStreamingHeadStart
Streaming initialization cannot be emitted before document content.
DuplicateStreamingHeadStart
A malformed protocol emitted streaming initialization more than once.
Trait Implementations§
Source§impl Debug for HandlerError
impl Debug for HandlerError
Source§impl Display for HandlerError
impl Display for HandlerError
Source§impl Error for HandlerError
impl Error for HandlerError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()