[][src]Struct fastly::request::PendingRequest

pub struct PendingRequest { /* fields omitted */ }

A handle to a pending asynchronous request returned by RequestExt::send_async().

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.

Methods

impl PendingRequest[src]

pub fn poll(self) -> PollResult[src]

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().

pub fn wait(self) -> Result<Response<Body>, Error>[src]

Block until the result of a pending request is ready.

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

Trait Implementations

impl From<PendingRequest> for PendingRequestHandle[src]

impl From<PendingRequestHandle> for PendingRequest[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.