pub type Dispatch<Req = UntypedMessage, Notif = UntypedMessage> = Dispatch<Req, Notif, V2>;Available on crate feature
unstable_protocol_v2 only.Expand description
Aliased Type§
pub enum Dispatch<Req = UntypedMessage, Notif = UntypedMessage> {
Request(Req, Responder<<Req as JsonRpcRequest>::Response, V2>),
Notification(Notif),
Response(Result<<Req as JsonRpcRequest>::Response, Error>, ResponseRouter<<Req as JsonRpcRequest>::Response, V2>),
}Variants§
Request(Req, Responder<<Req as JsonRpcRequest>::Response, V2>)
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, V2>)
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).