jsonrpc_core

Trait RpcMethod

Source
pub trait RpcMethod<T: Metadata>:
    Send
    + Sync
    + 'static {
    // Required method
    fn call(&self, params: Params, meta: T) -> BoxFuture<Result<Value>>;
}
Expand description

Asynchronous Method with Metadata

Required Methods§

Source

fn call(&self, params: Params, meta: T) -> BoxFuture<Result<Value>>

Call method

Implementors§

Source§

impl<F, X, T> RpcMethod<T> for F
where T: Metadata, F: Fn(Params, T) -> X + Send + Sync + 'static, X: Future<Output = Result<Value, Error>> + Send + 'static,