pub fn add_client_streaming_handler<Req, Resp, F>(
        mut self,
        method: &Method<Req, Resp>,
        mut handler: F,
    ) -> ServiceBuilder
    where
        Req: 'static,
        Resp: 'static,
        F: FnMut(RpcContext, RequestStream<Req>, ClientStreamingSink<Resp>)
            + Send
            + Clone
            + 'static,
    {
        let (ser, de) = (method.resp_ser(), method.req_de());
        let h =
            move |ctx: RpcContext, _: &[u8]| execute_client_streaming(ctx, ser, de, &mut handler);
        let ch = Box::new(Handler::new(MethodType::ClientStreaming, h));
        self.handlers.insert(method.name.as_bytes(), ch);
        self
    }
/// Add a client streaming RPC call handler.
Add a client streaming RPC call handler.
Add a client streaming RPC call handler .
pub fn add_client_streaming_handler<Req, Resp, F>(
        mut self,
        method: &Method<Req, Resp>,
        mut handler: F,
    ) -> ServiceBuilder
    where
        Req: 'static,
        Resp: 'static,
        F: FnMut(RpcContext, RequestStream<Req>, ClientStreamingSink<Resp>)
            + Send
            + Clone
            + 'static,
    {
        let (ser, de) = (method.resp_ser(), method.req_de());
        let h =
            move |ctx: RpcContext, _: &[u8]| execute_client_streaming(ctx, ser, de, &mut handler);
        let ch = Box::new(Handler::new(MethodType::ClientStreaming, h));
        self.handlers.insert(method.name.as_bytes(), ch);
        self
    }
pub fn add_client_streaming_handler < Req , Resp , F > ( mut self , method : & Method < Req , Resp > , mut handler : F , ) -> ServiceBuilder where Req : ' static , Resp : ' static , F : FnMut ( RpcContext , RequestStream < Req > , ClientStreamingSink < Resp > ) + Send + Clone + ' static , { let ( ser , de ) = ( method . resp_ser ( ) , method . req_de ( ) ) ; let h = move | ctx : RpcContext , _ : & [ u8 ] | execute_client_streaming ( ctx , ser , de , & mut handler ) ; let ch = Box :: new ( Handler :: new ( MethodType :: ClientStreaming , h ) ) ; self . handlers . insert ( method . name . as_bytes ( ) , ch ) ; self }
Add a client streaming RPC call handler.
Add a client streaming RPC call handler .
mut self
method
&Method<Req, Resp>
handler
F
mut self
method
&Method<Req, Resp>
handler
F