tauri_plugin_gpui/
error.rs1#[derive(Debug, thiserror::Error)]
3#[non_exhaustive]
4pub enum GpuiError {
5 #[error("tauri-plugin-gpui is not initialized; call `tauri_plugin_gpui::init(app)` in `setup`")]
7 NotInitialized,
8
9 #[error("tauri-plugin-gpui is already initialized")]
11 AlreadyInitialized,
12
13 #[error("GPUI is already attached to window `{label}`")]
15 AlreadyAttached {
16 label: String,
18 },
19
20 #[error("window `{label}` is not eligible for GPUI attachment: {reason}")]
22 NotEligible {
23 label: String,
25 reason: &'static str,
27 },
28
29 #[error("must be called on the Tauri event-loop (main) thread")]
31 NotMainThread,
32
33 #[error("the shared GPUI App is already in use further up the call stack")]
35 Reentrant,
36
37 #[error("unsupported operation: {operation}")]
39 UnsupportedOperation {
40 operation: &'static str,
42 },
43
44 #[error("GPUI platform initialization failed: {0}")]
46 PlatformInitialization(String),
47
48 #[error("GPUI renderer initialization failed: {0}")]
50 RendererInitialization(String),
51
52 #[error(transparent)]
54 Tauri(#[from] tauri::Error),
55}