pub struct H3BidiRequest<Transport, Handler> { /* private fields */ }Expand description
A pending HTTP/3 request-response cycle on one bidirectional stream, with optional per-stream hooks.
Built by H3Connection::process_inbound_bidi. Configure hooks with the with_*
methods and .await it to run the cycle. New per-stream extension points are added as
further with_* methods, so the entry point’s required arguments never change.
Implementations§
Source§impl<Transport, Handler> H3BidiRequest<Transport, Handler>
impl<Transport, Handler> H3BidiRequest<Transport, Handler>
Sourcepub fn with_reset<R>(self, reset: R) -> Self
pub fn with_reset<R>(self, reset: R) -> Self
Issue a stream RST on a stream-level protocol error.
On any H3Error::Protocol(code) from first-frame processing, reset is called with
the still-owned transport and the error code before the error is returned — letting the
caller RST both halves of the bidi stream as RFC 9114 requires. I/O errors and
successful runs do not invoke it. Without this hook, the transport is dropped without a
reset.
Trait Implementations§
Source§impl<Transport, Handler> Debug for H3BidiRequest<Transport, Handler>
impl<Transport, Handler> Debug for H3BidiRequest<Transport, Handler>
Source§impl<Transport, Handler, Fut> IntoFuture for H3BidiRequest<Transport, Handler>
impl<Transport, Handler, Fut> IntoFuture for H3BidiRequest<Transport, Handler>
Source§type IntoFuture = Pin<Box<dyn Future<Output = <H3BidiRequest<Transport, Handler> as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <H3BidiRequest<Transport, Handler> as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§type Output = Result<H3StreamResult<Transport>, H3Error>
type Output = Result<H3StreamResult<Transport>, H3Error>
The output that the future will produce on completion.
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<Transport, Handler> !RefUnwindSafe for H3BidiRequest<Transport, Handler>
impl<Transport, Handler> !Sync for H3BidiRequest<Transport, Handler>
impl<Transport, Handler> !UnwindSafe for H3BidiRequest<Transport, Handler>
impl<Transport, Handler> Freeze for H3BidiRequest<Transport, Handler>
impl<Transport, Handler> Send for H3BidiRequest<Transport, Handler>
impl<Transport, Handler> Unpin for H3BidiRequest<Transport, Handler>
impl<Transport, Handler> UnsafeUnpin for H3BidiRequest<Transport, Handler>where
Transport: UnsafeUnpin,
Handler: UnsafeUnpin,
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