Struct conserve::index::IndexBuilder
[−]
[src]
pub struct IndexBuilder { /* fields omitted */ }
Accumulates ordered changes to the index and streams them out to index files.
Methods
impl IndexBuilder
[src]
Accumulate and write out index entries into files in an index directory.
fn new(dir: &Path) -> IndexBuilder
[src]
Make a new builder that will write files into the given directory.
fn push(&mut self, entry: IndexEntry)
[src]
Append an entry to the index.
The new entry must sort after everything already written to the index.
fn maybe_flush(&mut self, report: &Report) -> Result<()>
[src]
fn finish_hunk(&mut self, report: &Report) -> Result<()>
[src]
Finish this hunk of the index.
This writes all the currently queued entries into a new index file in the band directory, and then clears the index to start receiving entries for the next hunk.