[−][src]Trait asuran::repository::backend::common::sync_backend::SyncIndex
Required methods
fn lookup_chunk(&mut self, id: ChunkID) -> Option<SegmentDescriptor>
fn set_chunk(&mut self, id: ChunkID, location: SegmentDescriptor) -> Result<()>
fn known_chunks(&mut self) -> HashSet<ChunkID>
fn commit_index(&mut self) -> Result<()>
fn chunk_count(&mut self) -> usize
Implementors
impl SyncIndex for FlatFile
[src]
fn lookup_chunk(&mut self, id: ChunkID) -> Option<SegmentDescriptor>
[src]
fn set_chunk(&mut self, id: ChunkID, location: SegmentDescriptor) -> Result<()>
[src]
fn known_chunks(&mut self) -> HashSet<ChunkID>
[src]
fn commit_index(&mut self) -> Result<()>
[src]
fn chunk_count(&mut self) -> usize
[src]
impl SyncIndex for Mem
[src]
fn lookup_chunk(&mut self, id: ChunkID) -> Option<SegmentDescriptor>
[src]
fn set_chunk(&mut self, id: ChunkID, location: SegmentDescriptor) -> Result<()>
[src]
fn known_chunks(&mut self) -> HashSet<ChunkID>
[src]
fn commit_index(&mut self) -> Result<()>
[src]
fn chunk_count(&mut self) -> usize
[src]
impl SyncIndex for SFTPIndex
[src]
fn lookup_chunk(&mut self, id: ChunkID) -> Option<SegmentDescriptor>
[src]
fn set_chunk(&mut self, id: ChunkID, location: SegmentDescriptor) -> Result<()>
[src]
fn known_chunks(&mut self) -> HashSet<ChunkID>
[src]
fn commit_index(&mut self) -> Result<()>
[src]
fn chunk_count(&mut self) -> usize
[src]
impl<F: Read + Write + Seek + 'static> SyncIndex for GenericFlatFile<F>
[src]
fn lookup_chunk(&mut self, id: ChunkID) -> Option<SegmentDescriptor>
[src]
Simply looks up the chunk in the cached index
map
fn set_chunk(&mut self, id: ChunkID, location: SegmentDescriptor) -> Result<()>
[src]
Updates the cached index
map, as well as adds the chunk to the
EntryFooterData
Errors
Will return Err
if the Chunk
had not been previously written with
write_chunk
, and thus has an unknown length.
fn known_chunks(&mut self) -> HashSet<ChunkID>
[src]
Collects the keys from the cached index
map into a HashSet
fn commit_index(&mut self) -> Result<()>
[src]
Flush the EntryFooterDisk
to disk and make a new one
fn chunk_count(&mut self) -> usize
[src]
Returns the size of the cached index
map