[][src]Trait easy_jsonrpc::Handler

pub trait Handler {
    fn handle(&self, method: &str, params: Params) -> Result<Value, Error>;

    fn handle_request(&self, raw_request: Value) -> MaybeReply { ... }
}

Handles jsonrpc requests.

Required methods

fn handle(&self, method: &str, params: Params) -> Result<Value, Error>

Type-check params and call method if method exists. This method is implemented automatically by the rpc macro.

Loading content...

Provided methods

fn handle_request(&self, raw_request: Value) -> MaybeReply

Parses raw_request as a jsonrpc request, handles request according to the jsonrpc spec.

Loading content...

Implementors

Loading content...