Struct indexed_file::File [−][src]
Expand description
A wrapper around async_std::fs::File
which implements ReadByLine
and holds an index of the
lines.
Fields
inner_file: BufReader<File>
Implementations
Open a new indexed file.
Returns an error if the index is malformed, missing or an io error occurs
Opens a non indexed file and generates the index.
Opens a non indexed file and uses a custom index index
.
Expects the index to be properly built.
Writes the index, followed by the files contents into writer
. A file generated using this
function will always be parsable by File::open
.
Returns the total amount of lines of the file.
Trait Implementations
Should return the offset to seek to given the line-index
Should seek to the reader used in read_to_eol
to the given SeekFrom
Should read from the current position until the end of the line, omitting the \n
Reads the given line
Auto Trait Implementations
impl !RefUnwindSafe for File
impl !UnwindSafe for File