Struct stream_httparse::streaming_parser::ReqParser [−][src]
A single Instance of the RequestParser that is used to parse HTTP-Requests
Implementations
impl ReqParser
[src]
pub fn new_capacity(cap: usize) -> Self
[src]
Creates a new Request-Parser with the given capacity as its pre-reserved capacity to store the Head of the Request
pub fn clear(&mut self)
[src]
Clears the internal Buffers and resets everything to be ready to receive and parse a new request
This should be the prefered way to parse mulitple sequential requests, as this avoids extra allocations
pub fn block_parse(&mut self, bytes: &[u8]) -> (bool, Option<usize>)
[src]
Returns a touple that stands for (done, data-left-in-buffer)
Explanation:
done
: True if the request has been fully received and parseddata-left-in-buffer
: The Amount of bytes at the end of the given slice that were unused
pub fn finish<'a, 'b>(&'a self) -> ParseResult<Request<'b>> where
'a: 'b,
[src]
'a: 'b,
Finishes up the parsing and finalizes all the Data it received and returns a Request-Instance containing the parsed out Request
Auto Trait Implementations
impl RefUnwindSafe for ReqParser
impl Send for ReqParser
impl Sync for ReqParser
impl Unpin for ReqParser
impl UnwindSafe for ReqParser
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,