Struct jsonrpc::map_request_handler::MapRequestHandler
[−]
[src]
pub struct MapRequestHandler { pub method_handlers: HashMap<String, Box<RpcMethodHandler>>, }
Fields
method_handlers: HashMap<String, Box<RpcMethodHandler>>
Methods
impl MapRequestHandler
[src]
fn new() -> MapRequestHandler
fn add_notification<PARAMS: Deserialize + 'static>(&mut self,
method_name: &'static str,
method_fn: Box<Fn(PARAMS)>)
method_name: &'static str,
method_fn: Box<Fn(PARAMS)>)
fn add_request<PARAMS: Deserialize + 'static, RET: Serialize + 'static, RET_ERROR: Serialize + 'static>(&mut self,
method_name: &'static str,
method_fn: Box<Fn(PARAMS) -> MethodResult<RET, RET_ERROR>>)
method_name: &'static str,
method_fn: Box<Fn(PARAMS) -> MethodResult<RET, RET_ERROR>>)
fn add_rpc_handler(&mut self,
method_name: &'static str,
method_handler: Box<RpcMethodHandler>)
method_name: &'static str,
method_handler: Box<RpcMethodHandler>)
Trait Implementations
impl RequestHandler for MapRequestHandler
[src]
fn handle_request(&mut self,
request_method: &str,
request_params: RequestParams,
completable: ResponseCompletable)
request_method: &str,
request_params: RequestParams,
completable: ResponseCompletable)