pub struct ChunkParser { /* private fields */ }
Expand description
A single ChunkParser instance used to parse multiple Chunks one after the other
Implementations§
Source§impl ChunkParser
impl ChunkParser
Sourcepub fn new() -> ChunkParser
pub fn new() -> ChunkParser
Creates a new empty Instance of the ChunkParser that is ready to start parsing Request
Sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Clears and resets the internal State to allow the parser to accept, receive and parse a new chunk without using up extra allocations,
Sourcepub fn block_parse(&mut self, data: &[u8]) -> (bool, usize)
pub fn block_parse(&mut self, data: &[u8]) -> (bool, usize)
Parses the given Block of data, returns the size it parsed as well as if it is done with parsing
Returns:
- If it is done and the
finish
function should be called - The amount of data that is still left in the Buffer (at the end)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChunkParser
impl RefUnwindSafe for ChunkParser
impl Send for ChunkParser
impl Sync for ChunkParser
impl Unpin for ChunkParser
impl UnwindSafe for ChunkParser
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