pub struct RequestStream<S, B> { /* private fields */ }Available on crate feature
h3 only.Implementations§
Source§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>
Source§impl<S, B> RequestStream<S, B>where
S: RecvStream,
impl<S, B> RequestStream<S, B>where
S: RecvStream,
Sourcepub 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.
Sourcepub 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)
Source§impl<S, B> RequestStream<S, B>where
S: SendStream<B>,
B: Buf,
impl<S, B> RequestStream<S, B>where
S: SendStream<B>,
B: Buf,
Sourcepub 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.
Sourcepub 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.
Sourcepub 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§
Source§impl<S, B> AsMut<RequestStream<S, B>> for RequestStream<S, B>
impl<S, B> AsMut<RequestStream<S, B>> for RequestStream<S, B>
Source§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.
Source§impl<S, B> CloseStream for RequestStream<S, B>
impl<S, B> CloseStream for RequestStream<S, B>
Source§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
Source§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
Source§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
Source§impl<S, B> ConnectionState for RequestStream<S, B>
impl<S, B> ConnectionState for RequestStream<S, B>
Get the shared state
Source§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
Source§fn set_conn_error(&self, error: ErrorOrigin) -> ErrorOrigin
fn set_conn_error(&self, error: ErrorOrigin) -> ErrorOrigin
tries to set the connection error
Source§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
Source§fn set_closing(&self)
fn set_closing(&self)
Set the connection to closing
Source§fn is_closing(&self) -> bool
fn is_closing(&self) -> bool
Check if the connection is closing
Source§fn set_settings(&self, settings: Settings)
fn set_settings(&self, settings: Settings)
Set the settings
Source§fn waker(&self) -> &AtomicWaker
fn waker(&self) -> &AtomicWaker
Returns the waker for the connection
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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