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