Enum libp2p_request_response::RequestResponseMessage [−][src]
pub enum RequestResponseMessage<TRequest, TResponse, TChannelResponse = TResponse> {
Request {
request_id: RequestId,
request: TRequest,
channel: ResponseChannel<TChannelResponse>,
},
Response {
request_id: RequestId,
response: TResponse,
},
}An inbound request or response.
Variants
A request message.
Show fields
Fields of Request
request_id: RequestIdThe ID of this request.
request: TRequestThe request message.
channel: ResponseChannel<TChannelResponse>The channel waiting for the response.
If this channel is dropped instead of being used to send a response
via RequestResponse::send_response, a RequestResponseEvent::InboundFailure
with InboundFailure::ResponseOmission is emitted.
A response message.
Show fields
Fields of Response
request_id: RequestIdThe ID of the request that produced this response.
response: TResponseThe response message.
Trait Implementations
Auto Trait Implementations
impl<TRequest, TResponse, TChannelResponse = TResponse> !RefUnwindSafe for RequestResponseMessage<TRequest, TResponse, TChannelResponse>
impl<TRequest, TResponse, TChannelResponse> Send for RequestResponseMessage<TRequest, TResponse, TChannelResponse> where
TChannelResponse: Send,
TRequest: Send,
TResponse: Send,
TChannelResponse: Send,
TRequest: Send,
TResponse: Send,
impl<TRequest, TResponse, TChannelResponse> Sync for RequestResponseMessage<TRequest, TResponse, TChannelResponse> where
TChannelResponse: Send,
TRequest: Sync,
TResponse: Sync,
TChannelResponse: Send,
TRequest: Sync,
TResponse: Sync,
impl<TRequest, TResponse, TChannelResponse> Unpin for RequestResponseMessage<TRequest, TResponse, TChannelResponse> where
TRequest: Unpin,
TResponse: Unpin,
TRequest: Unpin,
TResponse: Unpin,