fn decode_body<'buffer>(&mut self, buffer: &mut &'buffer [u8]) -> DecodeResult<()> {
        use self::GenericDecodeResult::*;

        if *self.content_length > buffer.len() {
            Incomplete
        } else {
            let (body, undecoded_buffer) = buffer.split_at(*self.content_length);
            *buffer = undecoded_buffer;
            self.state = DecodeState::End;
            self.builder.body(BytesMut::from(body));
            Complete(())
        }
    }
/// This function more so just extracts the body with a length determined by the content length
/// than it does decode it. This decoder does not try to decode the body based on the content
/// type, this should be done at a higher level.
This function more so just extracts the body with a length determined by the content length
than it does decode it. This decoder does not try to decode the body based on the content
type, this should be done at a higher level.
This function more so just extracts the body with a length determined by the content length than it does decode it . This decoder does not try to decode the body based on the content type this should be done at a higher level .
fn decode_body<'buffer>(&mut self, buffer: &mut &'buffer [u8]) -> DecodeResult<()> {
        use self::GenericDecodeResult::*;
        if *self.content_length > buffer.len() {
            Incomplete
        } else {
            let (body, undecoded_buffer) = buffer.split_at(*self.content_length);
            *buffer = undecoded_buffer;
            self.state = DecodeState::End;
            self.builder.body(BytesMut::from(body));
            Complete(())
        }
    }
fn decode_body < ' buffer > ( & mut self , buffer : & mut & ' buffer [ u8 ] ) -> DecodeResult < ( ) > { use self :: GenericDecodeResult :: * ; if * self . content_length > buffer . len ( ) { Incomplete } else { let ( body , undecoded_buffer ) = buffer . split_at ( * self . content_length ) ; * buffer = undecoded_buffer ; self . state = DecodeState :: End ; self . builder . body ( BytesMut :: from ( body ) ) ; Complete ( ( ) ) } }
This function more so just extracts the body with a length determined by the content length
than it does decode it.
This function more so just extracts the body with a length determined by the content length than it does decode it .
&mut self
buffer
&mut &'buffer [u8]
&mut self
buffer
&mut &'buffer [u8]