pub fn next_batch(&mut self) -> Option<io::Result<&[u8]>> {
        if self.pos < self.end_of_complete {
            let ret = &self.buf[self.pos..self.end_of_complete];
            self.pos = self.end_of_complete;
            return Some(Ok(ret));
        }

        match self.refill() {
            Ok(true) => self.next_batch(),
            Ok(false) => {
                if self.end_of_buffer == self.pos {
                    None
                } else {
                    self.pos = self.end_of_buffer;
                    Some(Ok(&self.buf[..self.end_of_buffer]))
                }
            }
            Err(e) => Some(Err(e)),
        }
    }
/// Return a slice of complete lines, up to the size of the internal buffer.
///
/// This is functionally identical to next_line, only instead of getting up
/// to the *first* instance of the delimiter, you get up to the *last*.
///
/// ```no_run
/// # use linereader::LineReader;
/// # use std::fs::File;
/// # use std::io;
/// # fn x() -> io::Result<()> {
/// # let mut reader = LineReader::new(File::open("myfile.txt")?);
/// while let Some(lines) = reader.next_batch() {
///     let lines = lines?;  // unwrap io::Result to &[u8]
/// }
/// # Ok(())
/// # }
/// ```
Return a slice of complete lines, up to the size of the internal buffer.
This is functionally identical to next_line, only instead of getting up
to the *first* instance of the delimiter, you get up to the *last*.


Return a slice of complete lines up to the size of the internal buffer . This is functionally identical to next_line only instead of getting up to the * first * instance of the delimiter you get up to the * last * .
pub fn next_batch(&mut self) -> Option<io::Result<&[u8]>> {
        if self.pos < self.end_of_complete {
            let ret = &self.buf[self.pos..self.end_of_complete];
            self.pos = self.end_of_complete;
            return Some(Ok(ret));
        }
        match self.refill() {
            Ok(true) => self.next_batch(),
            Ok(false) => {
                if self.end_of_buffer == self.pos {
                    None
                } else {
                    self.pos = self.end_of_buffer;
                    Some(Ok(&self.buf[..self.end_of_buffer]))
                }
            }
            Err(e) => Some(Err(e)),
        }
    }
pub fn next_batch ( & mut self ) -> Option < io :: Result < & [ u8 ] > > { if self . pos < self . end_of_complete { let ret = & self . buf [ self . pos .. self . end_of_complete ] ; self . pos = self . end_of_complete ; return Some ( Ok ( ret ) ) ; } match self . refill ( ) { Ok ( true ) => self . next_batch ( ) , Ok ( false ) => { if self . end_of_buffer == self . pos { None } else { self . pos = self . end_of_buffer ; Some ( Ok ( & self . buf [ .. self . end_of_buffer ] ) ) } } Err ( e ) => Some ( Err ( e ) ) , } }
Return a slice of complete lines, up to the size of the internal buffer.
Return a slice of complete lines up to the size of the internal buffer .
&mut self
&mut self
use linereader::linereader;
None
use std::fs::file;
None
use std::io;
None
fn x() -> io::result<()> {
None
let mut reader = linereader::new(file::open("myfile.txt")?);
while let Some(lines) = reader.next_batch() {
let lines = lines?;  // unwrap io::Result to &[u8]
}
while let Some ( lines ) = reader . next_batch () { let lines = lines? ; // unwrap io :: Result to & [ u8 ] }
ok(())
None
}
None