Struct ResponseFuture

#[must_use = "futures do nothing unless polled"]
pub struct ResponseFuture { /* private fields */ }

A future of an HTTP response.

Implementations

impl ResponseFuture

fn stream_id(&self) -> StreamId

Returns the stream ID of the response stream.

Panics

If the lock on the stream store has been poisoned.

fn poll_informational(&mut self, cx: &mut Context<'_>) -> Poll<Option<Result<Response<()>, Error>>>

Polls for informational responses (1xx status codes).

This method should be called before polling the main response future to check for any informational responses that have been received.

Returns Poll::Ready(Some(response)) if an informational response is available, Poll::Ready(None) if no more informational responses are expected, or Poll::Pending if no informational response is currently available.

fn push_promises(&mut self) -> PushPromises

Returns a stream of PushPromises

Panics

If this method has been called before or the stream was itself was pushed

Trait Implementations

impl Debug for ResponseFuture

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Future for ResponseFuture

type Output = Result<Response<RecvStream>, Error>;
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Auto Trait Implementations

impl Freeze for ResponseFuture

impl RefUnwindSafe for ResponseFuture

impl Send for ResponseFuture

impl Sync for ResponseFuture

impl Unpin for ResponseFuture

impl UnsafeUnpin for ResponseFuture

impl UnwindSafe for ResponseFuture

Blanket Implementations

impl<F> IntoFuture for ResponseFuture where F: Future,

type Output = <F as Future>::Output;
type IntoFuture = F;
fn into_future(self) -> <F as IntoFuture>::IntoFuture

impl<F, T, E> TryFuture for ResponseFuture where F: Future<Output = Result<T, E>> + ?Sized,

type Ok = T;
type Error = E;
fn try_poll(self: Pin<&mut F>, cx: &mut Context<'_>) -> Poll<<F as Future>::Output>

impl<T> Any for ResponseFuture where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for ResponseFuture where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for ResponseFuture where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for ResponseFuture

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> FutureExt for ResponseFuture where T: Future + ?Sized,

impl<T> Instrument for ResponseFuture

impl<T> WithSubscriber for ResponseFuture

impl<T, U> Into<U> for ResponseFuture where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for ResponseFuture where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for ResponseFuture where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>