hyperlane_plugin_rpc/
type.rs1use super::*;
2
3pub type RpcFuture = Pin<Box<dyn Future<Output = Result<Value, RpcError>> + Send>>;
5
6pub type RpcHandler = Arc<dyn Fn(Option<Value>) -> RpcFuture + Send + Sync>;
8
9pub(crate) type RpcMethodMap = HashMap<String, RpcHandler, BuildHasherDefault<FxHasher>>;
11
12pub(crate) type PreparedRpcCall =
14 Result<(RpcHandler, Option<Value>, Option<RpcId>), Option<Box<RpcResponse>>>;
15
16pub(crate) type PreparedBorrowedCall<'a> =
18 Result<(&'a RpcHandler, Option<Value>, Option<RpcId>), Option<CompactRpcResponse>>;