Skip to main content

ironsbe_client/
error.rs

1//! Error types for client operations.
2
3use thiserror::Error;
4
5/// Error type for client operations.
6#[derive(Debug, Error)]
7pub enum ClientError {
8    /// IO error.
9    #[error("IO error: {0}")]
10    Io(#[from] std::io::Error),
11
12    /// Transport error.
13    #[error("transport error: {0}")]
14    Transport(#[from] ironsbe_transport::TransportError),
15
16    /// Connection timeout.
17    #[error("connection timeout")]
18    ConnectTimeout,
19
20    /// Connection closed by server.
21    #[error("connection closed")]
22    ConnectionClosed,
23
24    /// Maximum reconnect attempts reached.
25    #[error("maximum reconnect attempts reached")]
26    MaxReconnectAttempts,
27
28    /// Channel error.
29    #[error("channel error")]
30    Channel,
31}