pub enum WebUIError {
ComponentAssetPublication {
context: String,
source: Box<dyn Error + Send + Sync>,
},
Io {
context: String,
source: Error,
},
ComponentRegistration {
context: String,
source: ParserError,
},
ComponentDiscovery(String),
Parse {
context: String,
source: ParserError,
},
Protocol(ProtocolError),
Serialization(String),
Rendering(HandlerError),
InvalidBuildOptions(String),
ComponentAssets(Box<Diagnostic>),
Projection(Box<Diagnostic>),
}Expand description
Errors that can occur during WebUI build, render, or inspection operations.
Variants§
ComponentAssetPublication
Transactional component asset publication or cleanup failure.
Fields
Io
I/O error (file read/write failures).
ComponentRegistration
Component registration failure while reading, transforming, or inserting an authored component source.
context names what was being registered (an app directory or a
discovered source). The underlying ParserError is preserved as a
structured #[source] rather than being flattened to a string, so a
build-time authoring mistake surfaced by a component-source transform
reaches the CLI as ParserError::Template with its stable diagnostic
code, source location, snippet, and help intact — the same
structured path already used by WebUIError::Parse.
Fields
source: ParserErrorThe underlying registration error, structurally preserved.
ComponentDiscovery(String)
Component discovery failure (npm packages or local paths).
Parse
HTML/CSS parsing failure with context about which file failed.
Protocol(ProtocolError)
Protocol serialization or deserialization failure.
Serialization(String)
JSON serialization failure.
Rendering(HandlerError)
Handler rendering error.
InvalidBuildOptions(String)
Invalid build-option configuration.
ComponentAssets(Box<Diagnostic>)
Static component asset graph failure with a structured diagnostic.
Projection(Box<Diagnostic>)
Bundler-neutral state projection manifest failure: malformed schema,
stale/missing input or output file, build-ID mismatch, conflicting or
duplicate fragment ownership, missing scripted-component coverage, or
an incompatible plugin. Carries a structured, color-free [Diagnostic]
with a stable PROJ-* code (see webui::projection::codes).
The diagnostic is boxed so this cold error path does not enlarge
Result<_, WebUIError> on the common success path.
Implementations§
Source§impl WebUIError
impl WebUIError
Sourcepub fn chain_message(&self) -> String
pub fn chain_message(&self) -> String
The full, single-line message including the source chain, e.g.
Failed to parse index.html: Directive error: Invalid for each: x.
Each error layer’s std::fmt::Display describes only its own level
(the #[source] chain carries the rest), so the CLI and dev server can
use anyhow’s {:#} formatting without repetition. Hosts that surface a
flat string instead of walking the chain — Node, FFI — use this helper
to get the same complete message.
Trait Implementations§
Source§impl Debug for WebUIError
impl Debug for WebUIError
Source§impl Display for WebUIError
impl Display for WebUIError
Source§impl Error for WebUIError
impl Error for WebUIError
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()
Source§impl From<HandlerError> for WebUIError
impl From<HandlerError> for WebUIError
Source§fn from(source: HandlerError) -> Self
fn from(source: HandlerError) -> Self
Source§impl From<ProtocolError> for WebUIError
impl From<ProtocolError> for WebUIError
Source§fn from(source: ProtocolError) -> Self
fn from(source: ProtocolError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for WebUIError
impl !UnwindSafe for WebUIError
impl Freeze for WebUIError
impl Send for WebUIError
impl Sync for WebUIError
impl Unpin for WebUIError
impl UnsafeUnpin for WebUIError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more