fn add(&mut self, chunk: &[u8]) -> ParsingResult<usize> {
        let mut pos = 0;
        
        while pos < chunk.len() && !self.is_complete() {
            if self.header.is_none() {
                pos += try!(self.process_header_data(&chunk[pos..]));
            } else {
                pos += self.process_body_data(&chunk[pos..])
            }
        }
        
        Ok(pos)
    }
/// Process a given chunk of data and return the number of bytes used.
Process a given chunk of data and return the number of bytes used.
Process a given chunk of data and return the number of bytes used .
fn add(&mut self, chunk: &[u8]) -> ParsingResult<usize> {
        let mut pos = 0;
        while pos < chunk.len() && !self.is_complete() {
            if self.header.is_none() {
                pos += try!(self.process_header_data(&chunk[pos..]));
            } else {
                pos += self.process_body_data(&chunk[pos..])
            }
        }
        Ok(pos)
    }
fn add ( & mut self , chunk : & [ u8 ] ) -> ParsingResult < usize > { let mut pos = 0 ; while pos < chunk . len ( ) && ! self . is_complete ( ) { if self . header . is_none ( ) { pos += try ! ( self process_header_data ( chunk [ pos ] ) ) ; } else { pos += self . process_body_data ( & chunk [ pos .. ] ) } } Ok ( pos ) }
Process a given chunk of data and return the number of bytes used.
Process a given chunk of data and return the number of bytes used .
&mut self
chunk
&[u8]
&mut self
chunk
&[u8]