pub struct Parser { /* private fields */ }Implementations§
Source§impl Parser
impl Parser
pub fn with_header(self, header_name: &'static [u8]) -> Result<Self>
pub fn with_request_line_read_timeout(self, timeout: Duration) -> Self
pub fn with_headers_read_timeout(self, timeout: Duration) -> Self
pub fn with_request_line_max_size(self, size: u16) -> Self
pub fn with_headers_max_size(self, size: u16) -> Self
Source§impl Parser
impl Parser
pub async fn parse_request_line<'a, 'b, 'c: 'a>( &'a self, reader: &'b mut (impl AsyncBufRead + Unpin), buffer: &'c mut Vec<u8>, ) -> Result<(Method, &'c [u8])>
pub async fn parse_headers<'a, 'b, 'c: 'a>( &'a self, reader: &'b mut (impl AsyncBufRead + Unpin), buffer: &'c mut Vec<u8>, ) -> Result<(KnownHeaders<'a>, Option<BTreeMap<&'static [u8], &'a [u8]>>)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnsafeUnpin for Parser
impl UnwindSafe for Parser
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