Skip to main content

Http3MessageContentState

Struct Http3MessageContentState 

Source
pub struct Http3MessageContentState { /* private fields */ }
Expand description

Bounded cumulative HTTP message-content and Content-Length state.

The caller supplies QPACK-decoded, semantically validated field sections before committing the corresponding message-stream transition. This state does not sequence frames or own tunnel bytes.

Implementations§

Source§

impl Http3MessageContentState

Source

pub const fn new(kind: Http3ContentKind) -> Self

Creates accounting state for one incoming request, response, or push message.

Source

pub const fn kind(self) -> Http3ContentKind

Returns this message’s role.

Source

pub const fn declared_length(self) -> Option<u64>

Returns the normalized initial Content-Length, if present.

Source

pub const fn received_length(self) -> u64

Returns HTTP message-content bytes accepted so far.

Tunnel bytes are deliberately not counted.

Source

pub fn accept_initial_headers( &mut self, section: Http3DecodedHeaderSection<'_>, ) -> Result<Http3ContentDisposition, Http3MessageContentError>

Accepts an initial request header section or an informational/final response section.

Source

pub fn receive_data( &mut self, data: Http3Data<'_>, ) -> Result<(), Http3MessageContentError>

Accounts for one HTTP DATA payload without buffering it.

Source

pub fn accept_trailers( &mut self, section: Http3DecodedHeaderSection<'_>, ) -> Result<(), Http3MessageContentError>

Accepts an analyzer-valid trailer section after content.

Source

pub fn finish(&self) -> Result<(), Http3MessageContentError>

Verifies that required headers arrived and Content-Length matches accepted HTTP content.

Trait Implementations§

Source§

impl Clone for Http3MessageContentState

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Http3MessageContentState

Source§

impl Debug for Http3MessageContentState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Http3MessageContentState

Source§

impl PartialEq for Http3MessageContentState

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Http3MessageContentState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.