[−][src]Struct fastly::http::request::PendingRequest
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
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()
.
Panics
Panics if the backend response exceeds any of the limits configured by
ResponseLimits
.
pub fn wait(self) -> Result<Response, SendError>
[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()
.
Panics
Panics if the backend response exceeds any of the limits configured by
ResponseLimits
.
pub fn sent_req(&self) -> &Request
[src]
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
impl From<PendingRequest> for PendingRequestHandle
[src]
pub fn from(pr: PendingRequest) -> Self
[src]
Auto Trait Implementations
impl RefUnwindSafe for PendingRequest
[src]
impl Send for PendingRequest
[src]
impl Sync for PendingRequest
[src]
impl Unpin for PendingRequest
[src]
impl UnwindSafe for PendingRequest
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,