Trait htrpc::HandleRpc

source ·
pub trait HandleRpc<P>: Clone + Send + 'staticwhere
    P: Procedure,{
    type Future: Future<Item = <P as Procedure>::Response, Error = NeverFail> + Send + 'static;

    // Required method
    fn handle_rpc(self, request: <P as Procedure>::Request) -> Self::Future;
}
Expand description

This trait allows to handle RPC requests issued by clients.

Required Associated Types§

source

type Future: Future<Item = <P as Procedure>::Response, Error = NeverFail> + Send + 'static

The Future which represents the result of an invocation of the handle_rpc method.

Required Methods§

source

fn handle_rpc(self, request: <P as Procedure>::Request) -> Self::Future

Handles an RPC request issued by a client.

Implementors§