potatonet_common/error.rs
1use crate::NodeId;
2
3/// 错误
4#[derive(Error, Debug)]
5pub enum Error {
6 #[error("method '{method}' not found")]
7 MethodNotFound { method: u32 },
8
9 #[error("service '{service_name}' not found")]
10 ServiceNotFound { service_name: String },
11
12 #[error("node '{id}' not exists")]
13 NodeNotExists { id: NodeId },
14
15 #[error("timeout")]
16 Timeout,
17
18 #[error("internal")]
19 Internal,
20}