/// Try to accept a client side streaming request.
///
/// Return error if the request is a client side unary request.
Try to accept a client side streaming request.
Return error if the request is a client side unary request.
Try to accept a client side streaming request . Return error if the request is a client side unary request .
pub fn handle_stream_req(
        self,
        cq: &CompletionQueue,
        rc: &mut RequestCallContext,
    ) -> result::Result<(), Self> {
        let handler = unsafe { rc.get_handler(self.method()) };
        match handler {
            Some(handler) => match handler.method_type() {
                MethodType::Unary | MethodType::ServerStreaming => Err(self),
                _ => {
                    execute(self, cq, &[], handler);
                    Ok(())
                }
            },
            None => {
                execute_unimplemented(self, cq.clone());
                Ok(())
            }
        }
    }
pub fn handle_stream_req ( self , cq : & CompletionQueue , rc : & mut RequestCallContext , ) -> result :: Result < ( ) , Self > { let handler = unsafe { rc . get_handler ( self . method ( ) ) } ; match handler { Some ( handler ) => match handler . method_type ( ) { MethodType :: Unary | MethodType :: ServerStreaming => Err ( self ) , _ => { execute ( self , cq , & [ ] , handler ) ; Ok ( ( ) ) } } , None => { execute_unimplemented ( self , cq . clone ( ) ) ; Ok ( ( ) ) } } }
Try to accept a client side streaming request.
Try to accept a client side streaming request .
self
cq
&CompletionQueue
rc
&mut RequestCallContext