photon_etcd_cluster/
error.rs

1//! Error types for photon-etcd-cluster.
2
3/// Errors that can occur during cluster operations.
4#[non_exhaustive]
5#[derive(Debug, thiserror::Error)]
6pub enum ClusterError {
7    /// Error from the etcd client.
8    #[error("etcd error: {0}")]
9    Etcd(#[from] etcd_client::Error),
10
11    /// Internal error (e.g., serialization, invalid state).
12    #[error("internal error: {0}")]
13    Internal(String),
14}
15
16/// Result type alias for cluster operations.
17pub type Result<T> = std::result::Result<T, ClusterError>;