Trait ya_service_bus::RpcHandler[][src]

pub trait RpcHandler<T: RpcMessage> {
    type Result: Future<Output = <RpcEnvelope<T> as Message>::Result> + 'static;
    fn handle(&mut self, caller: String, msg: T) -> Self::Result;
}

Associated Types

type Result: Future<Output = <RpcEnvelope<T> as Message>::Result> + 'static[src]

Required methods

fn handle(&mut self, caller: String, msg: T) -> Self::Result[src]

Implementors

impl<T: RpcMessage, Output: Future<Output = Result<T::Item, T::Error>> + 'static, F: FnMut(T) -> Output + 'static> RpcHandler<T> for F[src]

type Result = Output

fn handle(&mut self, _caller: String, msg: T) -> Self::Result[src]