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

        if buffer.len() < 4 {
            return Incomplete;
        }

        if buffer[3] != b' ' {
            return Error(DecodeError::StatusCode(StatusCodeError::Invalid));
        }

        match StatusCode::try_from(&buffer[0..3]) {
            Ok(status_code) => {
                self.builder.status_code(status_code);
                self.state = DecodeState::ReasonPhrase;
                *buffer = &buffer[4..];
                Complete(())
            }
            Err(error) => Error(error.into()),
        }
    }
/// Decodes a status code from the buffer.
Decodes a status code from the buffer.
Decodes a status code from the buffer .
fn decode_status_code<'buffer>(&mut self, buffer: &mut &'buffer [u8]) -> DecodeResult<()> {
        use self::GenericDecodeResult::*;
        if buffer.len() < 4 {
            return Incomplete;
        }
        if buffer[3] != b' ' {
            return Error(DecodeError::StatusCode(StatusCodeError::Invalid));
        }
        match StatusCode::try_from(&buffer[0..3]) {
            Ok(status_code) => {
                self.builder.status_code(status_code);
                self.state = DecodeState::ReasonPhrase;
                *buffer = &buffer[4..];
                Complete(())
            }
            Err(error) => Error(error.into()),
        }
    }
fn decode_status_code < ' buffer > ( & mut self , buffer : & mut & ' buffer [ u8 ] ) -> DecodeResult < ( ) > { use self :: GenericDecodeResult :: * ; if buffer . len ( ) < 4 { return Incomplete ; } if buffer [ 3 ] != b' ' { return Error ( DecodeError :: StatusCode ( StatusCodeError :: Invalid ) ) ; } match StatusCode :: try_from ( & buffer [ 0 .. 3 ] ) { Ok ( status_code ) => { self . builder . status_code ( status_code ) ; self . state = DecodeState :: ReasonPhrase ; * buffer = & buffer [ 4 .. ] ; Complete ( ( ) ) } Err ( error ) => Error ( error . into ( ) ) , } }
Decodes a status code from the buffer.
Decodes a status code from the buffer .
&mut self
buffer
&mut &'buffer [u8]
&mut self
buffer
&mut &'buffer [u8]