hyperlane-plugin-rpc 22.9.0

A JSON-RPC 2.0 server plugin for the Hyperlane framework with async method routing, batch dispatch, notification handling, and configurable payload and batch DoS bounds.
Documentation
1
2
3
4
5
6
7
use super::*;

/// Boxed `Send` future returned by an async JSON-RPC method handler.
pub type RpcFuture = Pin<Box<dyn Future<Output = Result<Value, RpcError>> + Send>>;

/// Thread-safe async JSON-RPC method callback.
pub type RpcHandler = Arc<dyn Fn(Option<Value>) -> RpcFuture + Send + Sync>;