pub trait Request: Send + Debug + AsAny + Message + SetRequestId {
    // Required methods
    fn timeout(&self, conf: &ProtocolConfiguration) -> Duration;
    fn notify_error(&mut self, error: Error);
    fn set_response_notification(
        &mut self,
        res_tx: Sender<Result<Box<dyn RpcResponse>, Error>>
    );
}
Expand description

Trait of request message

Required Methods§

source

fn timeout(&self, conf: &ProtocolConfiguration) -> Duration

Request timeout for resend purpose.

source

fn notify_error(&mut self, error: Error)

Notify the handler when error happens for the request.

source

fn set_response_notification( &mut self, res_tx: Sender<Result<Box<dyn RpcResponse>, Error>> )

This is for RPC request. Set the notification handle for the request.

Implementors§