Struct fastly::http::request::PendingRequest
source · 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§
source§impl PendingRequest
impl PendingRequest
sourcepub fn poll(self) -> PollResult
pub fn poll(self) -> PollResult
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()
.
Trait Implementations§
source§impl From<PendingRequest> for PendingRequestHandle
impl From<PendingRequest> for PendingRequestHandle
source§fn from(pr: PendingRequest) -> Self
fn from(pr: PendingRequest) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for PendingRequest
impl !RefUnwindSafe for PendingRequest
impl Send for PendingRequest
impl Sync for PendingRequest
impl Unpin for PendingRequest
impl !UnwindSafe for PendingRequest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more