pub struct ResponseHeadersState { /* private fields */ }Expand description
Headers state of the Response state-machine.
Implementations§
Source§impl ResponseHeadersState
impl ResponseHeadersState
pub fn status_code(&self) -> u32
Trait Implementations§
Source§impl<D> FromContextOnce<ResponseContext<D>> for ResponseHeadersState
impl<D> FromContextOnce<ResponseContext<D>> for ResponseHeadersState
type Error = InvalidResponseState
type Future<'c> = Pin<Box<dyn Future<Output = Result<ResponseHeadersState, <ResponseHeadersState as FromContextOnce<ResponseContext<D>>>::Error>> + 'c>> where D: 'c
fn from_context_once( context: Exclusive<'_, ResponseContext<D>>, ) -> Self::Future<'_>
Source§impl HeadersState for ResponseHeadersState
impl HeadersState for ResponseHeadersState
Source§fn handler(&self) -> &dyn HeadersHandler
fn handler(&self) -> &dyn HeadersHandler
Returns a handler for accessing the headers of the current HTTP Flow.
Source§fn contains_body(&self) -> bool
fn contains_body(&self) -> bool
Returns
true if the current HTTP Flow contains body.Source§impl IntoBodyState for ResponseHeadersState
impl IntoBodyState for ResponseHeadersState
Source§type BodyState = ResponseBodyState
type BodyState = ResponseBodyState
Concrete type for Body state of the Flow state-machine.
Source§type BodyStateFuture = Pin<Box<dyn Future<Output = <ResponseHeadersState as IntoBodyState>::BodyState>>>
type BodyStateFuture = Pin<Box<dyn Future<Output = <ResponseHeadersState as IntoBodyState>::BodyState>>>
A
Future that will be completed when the Body state is reached.Source§fn into_body_state(self) -> Self::BodyStateFuture
fn into_body_state(self) -> Self::BodyStateFuture
Moves the current state into the Body state of the HTTP Flow state-machine.
The
Future returned by this method can be cancelled.Source§impl IntoBodyStreamState for ResponseHeadersState
impl IntoBodyStreamState for ResponseHeadersState
type BodyStreamState = ResponseBodyStreamState
type BodyStreamStateFuture = Pin<Box<dyn Future<Output = <ResponseHeadersState as IntoBodyStreamState>::BodyStreamState>>>
fn into_body_stream_state(self) -> Self::BodyStreamStateFuture
Auto Trait Implementations§
impl Freeze for ResponseHeadersState
impl !RefUnwindSafe for ResponseHeadersState
impl !Send for ResponseHeadersState
impl !Sync for ResponseHeadersState
impl Unpin for ResponseHeadersState
impl !UnwindSafe for ResponseHeadersState
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