Trait indexed_file::IndexableFile[][src]

pub trait IndexableFile: Indexable {
    fn read_current_line(&mut self, buf: &mut Vec<u8>) -> Result<usize>;
fn seek_line(&mut self, line: usize) -> Result<()>;
fn write_to<W: Write + Unpin + Send>(
        &mut self,
        writer: &mut W
    ) -> Result<usize>; fn get_offset(&self, line: usize) -> Result<u64> { ... } }

Required methods

Should read from the current position until the end of the line, omitting the \n

Should seek the file to the given line line

Write the index, followed by the files contents into writer. A file generated using this function will always be parsable by File::open.

Provided methods

Should return the offset to seek to given the line-index

Implementors