pub struct PendingRequest { /* private fields */ }
Expand description

A handle to a pending asynchronous request returned by Request::send_async() or Request::send_async_streaming().

A handle can be evaluated using PendingRequest::poll(), PendingRequest::wait(), or select. It can also be discarded if the request was sent for effects it might have, and the response is unimportant.

Implementations

Try to get the result of a pending request without blocking.

This function returns immediately with a PollResult; if you want to block until a result is ready, use PendingRequest::wait().

Panics

Panics if the backend response exceeds any of the limits configured by ResponseLimits.

Block until the result of a pending request is ready.

If you want check whether the result is ready without blocking, use PendingRequest::poll().

Panics

Panics if the backend response exceeds any of the limits configured by ResponseLimits.

Get a reference to the original Request associated with this pending request.

Note that the request’s original body is already sending, so the returned request does not have a body.

Trait Implementations

Converts to this type from the input type.

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.