pub struct Http1Parser { /* private fields */ }
Expand description
HTTP/1.x Protocol Parser
Provides parsing capabilities for HTTP/1.0 and HTTP/1.1 requests and responses according to RFC 7230. Supports header parsing, cookie extraction, and various configuration options for security and performance.
§Thread Safety
This parser is thread-safe. Unlike the HTTP/2 parser, this parser does not maintain internal state and can be safely shared between threads or used concurrently.
Implementations§
Source§impl Http1Parser
impl Http1Parser
pub fn new() -> Self
pub fn parse_request( &self, data: &[u8], ) -> Result<Option<Http1Request>, Http1ParseError>
pub fn parse_response( &self, data: &[u8], ) -> Result<Option<Http1Response>, Http1ParseError>
HTTP/1.x cookie parsing - single cookie header with ’; ’ separation according to RFC 6265
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Http1Parser
impl RefUnwindSafe for Http1Parser
impl Send for Http1Parser
impl Sync for Http1Parser
impl Unpin for Http1Parser
impl UnwindSafe for Http1Parser
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