pub struct Http2Parser<'a> { /* private fields */ }
Expand description
HTTP/2 Protocol Parser
Provides parsing capabilities for HTTP/2 requests and responses according to RFC 7540. Supports HPACK header compression and handles various frame types.
§Thread Safety
This parser is NOT thread-safe. Each thread should create its own instance.
The internal HPACK decoder maintains state and uses RefCell
for interior mutability.
Implementations§
Source§impl<'a> Http2Parser<'a>
impl<'a> Http2Parser<'a>
pub fn new() -> Self
Sourcepub fn parse_request(
&self,
data: &[u8],
) -> Result<Option<Http2Request>, Http2ParseError>
pub fn parse_request( &self, data: &[u8], ) -> Result<Option<Http2Request>, Http2ParseError>
Parse HTTP/2 request from binary data
Sourcepub fn parse_response(
&self,
data: &[u8],
) -> Result<Option<Http2Response>, Http2ParseError>
pub fn parse_response( &self, data: &[u8], ) -> Result<Option<Http2Response>, Http2ParseError>
Parse HTTP/2 response from binary data
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Freeze for Http2Parser<'a>
impl<'a> !RefUnwindSafe for Http2Parser<'a>
impl<'a> Send for Http2Parser<'a>
impl<'a> !Sync for Http2Parser<'a>
impl<'a> Unpin for Http2Parser<'a>
impl<'a> UnwindSafe for Http2Parser<'a>
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