Struct fizyr_rpc::SentRequestHandle[][src]

pub struct SentRequestHandle<Body> { /* fields omitted */ }
Expand description

A handle for a sent request.

The handle can be used to receive updates and the response from the remote peer, and to send update messages to the remote peer.

Implementations

Get the request ID of the sent request.

Get the service ID of the initial request message.

Create a write handle for this request.

The write handle can be cloned and used even while this handle is mutably borrowed.

Receive the next update message of the request from the remote peer.

This function returns None if the final response is received instead of an update message. If that happens, the response message can be read using Self::recv_response.

Receive the final response of the request from the remote peer.

This function returns an error if the received message is an update message. You can detect this situation using Error::is_unexpected_message_type(). Afterwards, the update message can be read using Self::recv_update. To ensure that there are no update messages left, keep calling Self::recv_update untill it returns Ok(None).

Send an update for the request to the remote peer.

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

Performs the conversion.

Performs the conversion.

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.