Struct stream_httparse::streaming_parser::ChunkParser[][src]

pub struct ChunkParser { /* fields omitted */ }
Expand description

A single ChunkParser instance used to parse multiple Chunks one after the other

Implementations

impl ChunkParser[src]

pub fn new() -> ChunkParser[src]

Creates a new empty Instance of the ChunkParser that is ready to start parsing Request

pub fn clear(&mut self)[src]

Clears and resets the internal State to allow the parser to accept, receive and parse a new chunk without using up extra allocations,

pub fn block_parse(&mut self, data: &[u8]) -> (bool, usize)[src]

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)

pub fn finish(&mut self) -> Option<Chunk>[src]

Finishes the Parsing and returns the finsihed Chunk

Trait Implementations

impl Default for ChunkParser[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

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]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.