pub enum WebUIError {
Io {
context: String,
source: Error,
},
ComponentRegistration(String),
ComponentDiscovery(String),
Parse {
context: String,
source: ParserError,
},
Protocol(ProtocolError),
Serialization(String),
Rendering(HandlerError),
InvalidBuildOptions(String),
Projection(Box<Diagnostic>),
}Expand description
Errors that can occur during WebUI build, render, or inspection operations.
Variants§
Io
I/O error (file read/write failures).
ComponentRegistration(String)
Component registration failure.
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.
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