pub struct H2ConnectionDecoder { /* private fields */ }Expand description
Per-connection h2c decoder stacking the per-stream
H2StreamReassembler over the per-connection HpackDecoder.
The reassembler isolates HEADERS+CONTINUATION sequences per stream; the HPACK decoder is per-connection because RFC 7541 §2.3.1 says the dynamic table is a single per-connection compression context shared across all streams.
Implementations§
Source§impl H2ConnectionDecoder
impl H2ConnectionDecoder
Sourcepub fn feed_frame(
&mut self,
frame: &FrameHeader,
payload: &[u8],
) -> Result<Option<H2HeadersDecoded>, H2ParseError>
pub fn feed_frame( &mut self, frame: &FrameHeader, payload: &[u8], ) -> Result<Option<H2HeadersDecoded>, H2ParseError>
Feed a single frame.
Returns Some(decoded) when a HEADERS+CONTINUATION block
completes; None when more bytes are needed or the frame was
not HEADERS/CONTINUATION. Errors are stream-scoped — the caller
decides whether to RST_STREAM the offender or close the
whole connection.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for H2ConnectionDecoder
impl RefUnwindSafe for H2ConnectionDecoder
impl Send for H2ConnectionDecoder
impl Sync for H2ConnectionDecoder
impl Unpin for H2ConnectionDecoder
impl UnsafeUnpin for H2ConnectionDecoder
impl UnwindSafe for H2ConnectionDecoder
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