use super::*;
pub type RpcFuture = Pin<Box<dyn Future<Output = Result<Value, RpcError>> + Send>>;
pub type RpcHandler = Arc<dyn Fn(Option<Value>) -> RpcFuture + Send + Sync>;
pub(crate) type RpcMethodMap = HashMap<String, RpcHandler, BuildHasherDefault<FxHasher>>;
pub(crate) type PreparedRpcCall =
Result<(RpcHandler, Option<Value>, Option<RpcId>), Option<Box<RpcResponse>>>;
pub(crate) type PreparedBorrowedCall<'a> =
Result<(&'a RpcHandler, Option<Value>, Option<RpcId>), Option<CompactRpcResponse>>;