pub struct Responder<I: 'static + Interchange> { /* private fields */ }
Expand description

Processing end of the RPC interchange.

The owner of this end must eventually reply to any requests made to it. In case there is a cancelation of the request, this must be acknowledged instead.

Implementations

Current state of the interchange.

Informational only!

The responder may change this state between calls, internally atomics ensure correctness.

If there is a request waiting, take a reference to it out

This may be called only once as it move the state to BuildingResponse. If you need copies, clone the request.

If there is a request waiting, take a reference to it out

This may be called only once as it move the state to BuildingResponse. If you need copies, clone the request.

Respond to a request.

If efficiency is a concern, or responses need multiple steps to construct, use response_mut and `send_response.

If there is a request waiting that no longer needs to be accessed, may build response into the returned value.

Send a response that was already placed in the interchange using response_mut.

Trait Implementations

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.

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.