Skip to main content

tauri_mcp/
lib.rs

1pub mod server;
2pub mod tools;
3pub mod utils;
4
5use thiserror::Error;
6
7#[derive(Error, Debug)]
8pub enum TauriMcpError {
9    #[error("Process error: {0}")]
10    ProcessError(String),
11    
12    #[error("Window error: {0}")]
13    WindowError(String),
14    
15    #[error("Screenshot error: {0}")]
16    ScreenshotError(String),
17    
18    #[error("Input simulation error: {0}")]
19    InputError(String),
20    
21    #[error("IPC error: {0}")]
22    IpcError(String),
23    
24    #[error("WebDriver error: {0}")]
25    WebDriverError(String),
26    
27    #[error("Configuration error: {0}")]
28    ConfigError(String),
29    
30    #[error("IO error: {0}")]
31    IoError(#[from] std::io::Error),
32    
33    #[error("JSON error: {0}")]
34    JsonError(#[from] serde_json::Error),
35    
36    #[error("Other error: {0}")]
37    Other(String),
38}
39
40pub type Result<T> = std::result::Result<T, TauriMcpError>;