leptos_sync_core/error/
mod.rs

1//! Error types and handling for the core library
2
3use thiserror::Error;
4
5pub mod retry;
6
7#[derive(Error, Debug)]
8pub enum CoreError {
9    #[error("Storage error: {0}")]
10    Storage(String),
11    #[error("Transport error: {0}")]
12    Transport(String),
13    #[error("Serialization error: {0}")]
14    Serialization(String),
15    #[error("CRDT error: {0}")]
16    Crdt(String),
17    #[error("Sync error: {0}")]
18    Sync(String),
19    #[error("Security error: {0}")]
20    Security(String),
21    #[error("Retry error: {0}")]
22    Retry(String),
23    #[error("Invalid operation: {0}")]
24    InvalidOperation(String),
25}
26
27pub type Result<T> = std::result::Result<T, CoreError>;