Trait rmp_rpc::ServiceWithClient [] [src]

pub trait ServiceWithClient {
    type RequestFuture: IntoStaticFuture<Item = Value, Error = Value>;
    fn handle_request(
        &mut self,
        client: &mut Client,
        method: &str,
        params: &[Value]
    ) -> Self::RequestFuture;
fn handle_notification(
        &mut self,
        client: &mut Client,
        method: &str,
        params: &[Value]
    ); }

This is a beefed-up version of Service, in which the various handler methods also get access to a Client, which allows them to send requests and notifications to the same msgpack-rpc client that made the original request.

Associated Types

The type of future returned by handle_request.

Required Methods

Handle a MessagePack-RPC request.

This differs from Service::handle_request in that you also get access to a Client for sending requests and notifications.

Handle a MessagePack-RPC notification.

This differs from Service::handle_notification in that you also get access to a Client for sending requests and notifications.

Implementors