bridge_core/
error.rs

1//! Error types for BridgeRust
2
3use thiserror::Error;
4
5#[derive(Error, Debug)]
6pub enum BridgeError {
7    #[error("Validation error: {0}")]
8    Validation(String),
9
10    #[error("I/O error: {0}")]
11    Io(#[from] std::io::Error),
12
13    #[error("JSON error: {0}")]
14    Json(#[from] serde_json::Error),
15
16    #[error("FFI error: {0}")]
17    Ffi(String),
18
19    #[error("Internal error: {0}")]
20    Internal(String),
21}
22
23pub type Result<T> = std::result::Result<T, BridgeError>;