pub type Dispatch<Req = UntypedMessage, Notif = UntypedMessage> = Dispatch<Req, Notif, V1>;Expand description
Aliased Type§
pub enum Dispatch<Req = UntypedMessage, Notif = UntypedMessage> {
Request(Req, Responder<<Req as JsonRpcRequest>::Response, V1>),
Notification(Notif),
Response(Result<<Req as JsonRpcRequest>::Response, Error>, ResponseRouter<<Req as JsonRpcRequest>::Response, V1>),
}Variants§
Request(Req, Responder<<Req as JsonRpcRequest>::Response, V1>)
Incoming request and the context where the response should be sent.
Notification(Notif)
Incoming notification.
Response(Result<<Req as JsonRpcRequest>::Response, Error>, ResponseRouter<<Req as JsonRpcRequest>::Response, V1>)
Incoming response to a request we sent.
The first field is the response result (success or error from the remote). The second field is the context for forwarding the response to its destination (typically a waiting oneshot channel).