pub struct Http3PushPromise<'a> { /* private fields */ }Expand description
A validated borrowed HTTP/3 PUSH_PROMISE frame.
Implementations§
Source§impl<'a> Http3PushPromise<'a>
impl<'a> Http3PushPromise<'a>
Sourcepub fn parse(
bytes: &'a [u8],
maximum_payload: usize,
) -> Result<Self, Http3FramePayloadParseError>
pub fn parse( bytes: &'a [u8], maximum_payload: usize, ) -> Result<Self, Http3FramePayloadParseError>
Parses the first complete PUSH_PROMISE frame, enforcing the caller-provided payload maximum.
Sourcepub fn from_frame(
frame: Http3Frame<'a>,
) -> Result<Self, Http3FramePayloadParseError>
pub fn from_frame( frame: Http3Frame<'a>, ) -> Result<Self, Http3FramePayloadParseError>
Validates a raw PUSH_PROMISE frame’s initial Push ID without decoding QPACK.
Sourcepub const fn frame(&self) -> Http3Frame<'a>
pub const fn frame(&self) -> Http3Frame<'a>
Returns the validated raw frame.
Sourcepub const fn push_id(&self) -> Http3PushId
pub const fn push_id(&self) -> Http3PushId
Returns the raw-preserving Push ID.
Sourcepub const fn push_id_varint(&self) -> QuicVarInt<'a>
pub const fn push_id_varint(&self) -> QuicVarInt<'a>
Returns the exact Push ID variable-length integer.
Sourcepub fn encoded_field_section(&self) -> &'a [u8]
pub fn encoded_field_section(&self) -> &'a [u8]
Returns the remaining opaque QPACK-encoded field section.
Source§impl Http3PushPromise<'_>
impl Http3PushPromise<'_>
Sourcepub fn decode_field_section<'output>(
&self,
decoder: &QpackFieldSectionDecoder,
table: &QpackDynamicTable<'_, '_>,
output: &'output mut QpackFieldSectionOutput<'_, '_>,
) -> Result<QpackFieldSectionDecodeOutcome<'output>, Http3QpackFieldSectionError>
pub fn decode_field_section<'output>( &self, decoder: &QpackFieldSectionDecoder, table: &QpackDynamicTable<'_, '_>, output: &'output mut QpackFieldSectionOutput<'_, '_>, ) -> Result<QpackFieldSectionDecodeOutcome<'output>, Http3QpackFieldSectionError>
Decodes this PUSH_PROMISE frame’s exact encoded field section into caller-owned output.
The QPACK decoder’s transactional output and table guarantees are preserved. A
QpackFieldSectionDecodeOutcome::Blocked result is successful; retry this same field
section after the dynamic table’s insert count advances. Output-provisioning failures are
local caller errors, not HTTP/3 peer errors.