pub struct Http3MessageStreamState { /* private fields */ }Expand description
Bounded state for receiving one incoming HTTP/3 request, response, or push message.
Implementations§
Source§impl Http3MessageStreamState
impl Http3MessageStreamState
Sourcepub const fn new(kind: Http3MessageStreamKind) -> Self
pub const fn new(kind: Http3MessageStreamKind) -> Self
Creates state for an incoming stream of the supplied message kind.
Sourcepub const fn kind(self) -> Http3MessageStreamKind
pub const fn kind(self) -> Http3MessageStreamKind
Returns this stream’s incoming message kind.
Sourcepub const fn position(self) -> Http3MessagePosition
pub const fn position(self) -> Http3MessagePosition
Returns the current message position.
Sourcepub fn receive<'state, 'wire>(
&'state mut self,
frame: Http3Frame<'wire>,
) -> Result<Http3MessageFrame<'state, 'wire>, Http3MessageStreamError>
pub fn receive<'state, 'wire>( &'state mut self, frame: Http3Frame<'wire>, ) -> Result<Http3MessageFrame<'state, 'wire>, Http3MessageStreamError>
Receives a structurally bounded frame from this message stream.
A HEADERS event retains the mutable state borrow until its QPACK-decoded semantic role is accepted. On every error, state is unchanged.
Sourcepub const fn finish(&self) -> Result<(), Http3MessageStreamError>
pub const fn finish(&self) -> Result<(), Http3MessageStreamError>
Validates that this message ended after its complete header and optional content sequence.
Trait Implementations§
Source§impl Clone for Http3MessageStreamState
impl Clone for Http3MessageStreamState
impl Copy for Http3MessageStreamState
Source§impl Debug for Http3MessageStreamState
impl Debug for Http3MessageStreamState
impl Eq for Http3MessageStreamState
Source§impl PartialEq for Http3MessageStreamState
impl PartialEq for Http3MessageStreamState
impl StructuralPartialEq for Http3MessageStreamState
Auto Trait Implementations§
impl Freeze for Http3MessageStreamState
impl RefUnwindSafe for Http3MessageStreamState
impl Send for Http3MessageStreamState
impl Sync for Http3MessageStreamState
impl Unpin for Http3MessageStreamState
impl UnsafeUnpin for Http3MessageStreamState
impl UnwindSafe for Http3MessageStreamState
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