pub enum DesktopError {
Show 19 variants
WebsiteData(WebsiteDataError),
PackagedResourcesNotFound,
Backend {
source: Box<dyn Error + Send + Sync>,
},
Io {
context: String,
source: Error,
},
Render(HandlerError),
Protocol(ProtocolError),
StateJson {
path: PathBuf,
source: Error,
},
Serialization {
context: String,
source: Error,
},
Token {
context: String,
source: TokenError,
},
InvalidAssetPath {
path: String,
},
InvalidRoutePattern {
pattern: String,
help: String,
},
RouteProvider {
path: String,
message: String,
},
AssetTooLarge {
path: PathBuf,
size: u64,
max_bytes: u64,
},
BundleAssetCollision {
path: String,
},
OutputPathOverlap {
output: PathBuf,
input: PathBuf,
input_label: &'static str,
},
PackageValidation {
message: String,
help: &'static str,
},
ManifestSerialization(Error),
ManifestDeserialization {
path: PathBuf,
source: Error,
},
UnsupportedRuntime {
message: String,
help: String,
},
}Expand description
Errors produced by the runtime-neutral WebUI desktop layer.
Variants§
WebsiteData(WebsiteDataError)
An explicit native website-data persistence request failed.
PackagedResourcesNotFound
No desktop bundle could be found beside the running executable.
Backend
A native or custom desktop backend could not complete an operation.
Io
I/O failure while reading or writing desktop runtime data.
Render(HandlerError)
Handler rendering failed.
Protocol(ProtocolError)
Protocol serialization or deserialization failed.
StateJson
State JSON could not be parsed.
Serialization
JSON serialization failed.
Token
Design token loading or resolution failed.
InvalidAssetPath
A custom-protocol asset path was unsafe.
InvalidRoutePattern
A Rust route provider pattern is invalid.
RouteProvider
A Rust route provider failed.
AssetTooLarge
An asset exceeds the configured in-memory response cap.
Fields
BundleAssetCollision
Two bundle inputs resolve to the same output asset path.
OutputPathOverlap
A bundle or package output path overlaps an input path.
Fields
PackageValidation
An already-compiled host package input is invalid or unsafe.
ManifestSerialization(Error)
Bundle manifest serialization failed.
ManifestDeserialization
Bundle manifest deserialization failed.
UnsupportedRuntime
Platform runtime does not support a required desktop capability.
Implementations§
Source§impl DesktopError
impl DesktopError
Sourcepub fn hint(&self) -> Option<&str>
pub fn hint(&self) -> Option<&str>
Return an actionable hint for errors that have a clear next step.
Sourcepub fn chain_message(&self) -> String
pub fn chain_message(&self) -> String
Return a flattened source-chain message for hosts that do not walk
std::error::Error::source.
Trait Implementations§
Source§impl Debug for DesktopError
impl Debug for DesktopError
Source§impl Display for DesktopError
impl Display for DesktopError
Source§impl Error for DesktopError
impl Error for DesktopError
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()