pub fn read_buf_bytes_ref(&mut self, len: usize) -> io::Result<&'a [u8]> {
        if self.pos + len > self.buf.len() {
            return Err(io::Error::new(io::ErrorKind::UnexpectedEof, UNDERRUN_ERROR_STR));
        }
        self.pos += len;
        Ok(&self.buf[self.pos - len..self.pos])
    }
/// Returns a reference to the next `len` bytes in the buffer and advances the stream.
Returns a reference to the next `len` bytes in the buffer and advances the stream.
Returns a reference to the next ` len ` bytes in the buffer and advances the stream .
pub fn read_buf_bytes_ref(&mut self, len: usize) -> io::Result<&'a [u8]> {
        if self.pos + len > self.buf.len() {
            return Err(io::Error::new(io::ErrorKind::UnexpectedEof, UNDERRUN_ERROR_STR));
        }
        self.pos += len;
        Ok(&self.buf[self.pos - len..self.pos])
    }
pub fn read_buf_bytes_ref ( & mut self , len : usize ) -> io :: Result < & ' a [ u8 ] > { if self . pos + len > self . buf . len ( ) { return Err ( io :: Error :: new ( io :: ErrorKind :: UnexpectedEof , UNDERRUN_ERROR_STR ) ) ; } self . pos += len ; Ok ( & self . buf [ self . pos - len .. self . pos ] ) }
Returns a reference to the next `len` bytes in the buffer and advances the stream.
Returns a reference to the next ` len ` bytes in the buffer and advances the stream .
&mut self
len
usize
&mut self
len
usize