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)>
)
&mut self,
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>>
)
&mut self,
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>
)
&mut self,
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
)
&mut self,
request_method: &str,
request_params: RequestParams,
completable: ResponseCompletable
)