jsonrpc_core

Trait RpcMethodSimple

Source
pub trait RpcMethodSimple:
    Send
    + Sync
    + 'static {
    type Out: Future<Output = Result<Value, Error>> + Send;

    // Required method
    fn call(&self, params: Params) -> Self::Out;
}
Expand description

Asynchronous Method

Required Associated Types§

Source

type Out: Future<Output = Result<Value, Error>> + Send

Output future

Required Methods§

Source

fn call(&self, params: Params) -> Self::Out

Call method

Implementors§

Source§

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

Source§

type Out = X