Struct RequestStream
pub struct RequestStream<S, B> { /* private fields */ }Available on crate features
quic and h3 and i-implement-a-third-party-backend-and-opt-into-breaking-changes only.Implementations§
§impl<S, B> RequestStream<S, B>
impl<S, B> RequestStream<S, B>
pub fn new( stream: FrameStream<S, B>, max_field_section_size: u64, conn_state: Arc<SharedState>, grease: bool, ) -> RequestStream<S, B>
§impl<S, B> RequestStream<S, B>where
S: RecvStream,
impl<S, B> RequestStream<S, B>where
S: RecvStream,
pub fn poll_recv_data(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<Option<impl Buf>, StreamError>>
pub fn poll_recv_data( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Option<impl Buf>, StreamError>>
Receive some of the request body.
pub fn poll_recv_trailers(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<Option<HeaderMap>, StreamError>>
pub fn poll_recv_trailers( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Option<HeaderMap>, StreamError>>
Poll receive trailers.
pub fn stop_sending(&mut self, err_code: Code)
§impl<S, B> RequestStream<S, B>where
S: SendStream<B>,
B: Buf,
impl<S, B> RequestStream<S, B>where
S: SendStream<B>,
B: Buf,
pub async fn send_data(&mut self, buf: B) -> Result<(), StreamError>
pub async fn send_data(&mut self, buf: B) -> Result<(), StreamError>
Send some data on the response body.
pub async fn send_trailers(
&mut self,
trailers: HeaderMap,
) -> Result<(), StreamError>
pub async fn send_trailers( &mut self, trailers: HeaderMap, ) -> Result<(), StreamError>
Send a set of trailers to end the request.
pub fn stop_stream(&mut self, code: Code)
pub fn stop_stream(&mut self, code: Code)
Stops a stream with an error code
pub async fn finish(&mut self) -> Result<(), StreamError>
Trait Implementations§
§impl<S, B> AsMut<RequestStream<S, B>> for RequestStream<S, B>
impl<S, B> AsMut<RequestStream<S, B>> for RequestStream<S, B>
§fn as_mut(&mut self) -> &mut RequestStream<S, B>
fn as_mut(&mut self) -> &mut RequestStream<S, B>
Converts this type into a mutable reference of the (usually inferred) input type.
§impl<S, B> CloseStream for RequestStream<S, B>
impl<S, B> CloseStream for RequestStream<S, B>
§fn handle_connection_error_on_stream(
&mut self,
internal_error: InternalConnectionError,
) -> StreamError
fn handle_connection_error_on_stream( &mut self, internal_error: InternalConnectionError, ) -> StreamError
Handles a connection error on a stream
§fn handle_quic_stream_error(&self, error: StreamErrorIncoming) -> StreamError
fn handle_quic_stream_error(&self, error: StreamErrorIncoming) -> StreamError
Handles a incoming stream error from the quic layer
§fn check_peer_connection_closing(&self) -> Option<StreamError>
fn check_peer_connection_closing(&self) -> Option<StreamError>
Checks if the peer connection is closing an if it is allowed to send a request / server push
§impl<S, B> ConnectionState for RequestStream<S, B>
impl<S, B> ConnectionState for RequestStream<S, B>
Get the shared state
§fn get_conn_error(&self) -> Option<ErrorOrigin>
fn get_conn_error(&self) -> Option<ErrorOrigin>
Get the connection error if the connection is in error state because of another task Read more
§fn set_conn_error(&self, error: ErrorOrigin) -> ErrorOrigin
fn set_conn_error(&self, error: ErrorOrigin) -> ErrorOrigin
tries to set the connection error
§fn set_conn_error_and_wake<T>(&self, error: T) -> ErrorOriginwhere
T: Into<ErrorOrigin>,
fn set_conn_error_and_wake<T>(&self, error: T) -> ErrorOriginwhere
T: Into<ErrorOrigin>,
set the connection error and wake the connection
§fn set_closing(&self)
fn set_closing(&self)
Set the connection to closing
§fn is_closing(&self) -> bool
fn is_closing(&self) -> bool
Check if the connection is closing
§fn set_settings(&self, settings: Settings)
fn set_settings(&self, settings: Settings)
Set the settings
Auto Trait Implementations§
impl<S, B> !Freeze for RequestStream<S, B>
impl<S, B> !RefUnwindSafe for RequestStream<S, B>
impl<S, B> Send for RequestStream<S, B>
impl<S, B> Sync for RequestStream<S, B>
impl<S, B> Unpin for RequestStream<S, B>
impl<S, B> !UnwindSafe for RequestStream<S, B>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more