[−][src]Trait easy_jsonrpc::JSONRPCServer
Handles jsonrpc calls.
Required methods
fn handle(&self, method: &str, params: Params) -> Result<Value, Error>
type-check params and call method if method exists
Provided methods
fn handle_call(&self, call: Call) -> Option<Output>
extract method name and parameters from call
if call is a normal method call, call handle
and return result
if call is a notification, call handle
and return None
if call is invalid return a jsonrpc failure
fn handle_parsed(&self, request: Request) -> Option<Response>
Handle a structured jsonrpc request. If the request is a batch, handle the entire batch. return the singe result or a batch of results If the request consists of only notifications, return nothing as per jsonrpc 2.0 spec
fn handle_raw(&self, request: &str) -> Option<String>
Accept request as a jsonrpc formatted string. Call handler. Return result as a jsonrpc formatted string.