/// If the buffer has been exhausted, fetch a new block of data to replenish the buffer. If
/// no more data could be fetched, return an end-of-stream error.
If the buffer has been exhausted, fetch a new block of data to replenish the buffer. If
no more data could be fetched, return an end-of-stream error.
If the buffer has been exhausted fetch a new block of data to replenish the buffer . If no more data could be fetched return an end - of - stream error .
fn fetch_or_eof(&mut self) -> io::Result<()> {
        self.fetch()?;
        if self.is_buffer_exhausted() {
            return Err(io::Error::new(io::ErrorKind::UnexpectedEof, END_OF_STREAM_ERROR_STR));
        }
        Ok(())
    }
fn fetch_or_eof ( & mut self ) -> io :: Result < ( ) > { self . fetch ( ) ? ; if self . is_buffer_exhausted ( ) { return Err ( io :: Error :: new ( io :: ErrorKind :: UnexpectedEof , END_OF_STREAM_ERROR_STR ) ) ; } Ok ( ( ) ) }
If the buffer has been exhausted, fetch a new block of data to replenish the buffer.
If the buffer has been exhausted fetch a new block of data to replenish the buffer .
&mut self