pub struct ReceiveRequest<Rq, Rs> {
    pub request_id: RequestId,
    pub peer: PeerId,
    pub request: Rq,
    pub response_tx: Sender<Rs>,
}
Expand description

Inbound Request from a remote peer. It is expected that a response will be returned through the response_rx channel, otherwise an OutboundFailure will occur at the remote peer.

Fields

request_id: RequestId

ID of the request.

peer: PeerId

ID of the remote peer that send the request.

request: Rq

Request from the remote peer.

response_tx: Sender<Rs>

Channel for returning the response.

Note: If an InboundFailure occurs before a response was sent, the Receiver side of this channel is dropped.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.