Struct indexed_file::bufreader::IndexedBufReader [−][src]
pub struct IndexedBufReader<R: Read + Unpin + Seek + Send> { pub reader: BufReader<R>, // some fields omitted }
Expand description
A wrapper around BufReader<R>
which implements ReadByLine
and holds an index of the
lines.
Fields
reader: BufReader<R>
Implementations
Creates a new IndexedBufReader
using a BufReader
Creates a new IndexedBufReader
with the current index. reader
should contain the same
data used in &self
or the index might be invalid for the given reader
Trait Implementations
Returns the total amount of lines in the file without the lines used by the index.
Should return the offset to seek to given the line-index
Should read from the current position until the end of the line, omitting the \n
Reads the given line and stores into buf
Do a binary search on ReadByLine
implementing Types, since it provides everything required
for binary search. Only works with sorted files Read more
Do a binary search by on ReadByLine
implementing Types, since it provides everything required
for binary search. Only works with sorted files Read more
Do a binary search on ReadByLine
implementing Types, since it provides everything required
for binary search. Only works with sorted files Read more