Trait msgpack_rpc::Handler [] [src]

pub trait Handler: 'static {
    type RequestFuture: Future<Item = Value, Error = Value>;
    type NotifyFuture: Future<Item = (), Error = ()>;
    fn handle_request(
        &self,
        method: &str,
        params: Value,
        client: &Client
    ) -> Self::RequestFuture;
fn handle_notification(
        &self,
        method: &str,
        params: Value,
        client: &Client
    ) -> Self::NotifyFuture; }

A handler of requests/notifications.

Associated Types

The future returned from Self::handle_request()

The future returned from Self::handle_notification()

Required Methods

Handler function to handle a request.

Handler function to handle a notification.

Implementors