From d59397e60ed1ae43453ce4ac7e29bf93a279043d Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 14 Feb 2019 11:39:09 +0100 Subject: [PATCH] backup/datastore: expose chunk_store.get_chunk_iterator will be used by the protocol handler to iterate over existing chunks Signed-off-by: Wolfgang Bumiller --- src/backup/datastore.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs index d52397fd..98944e59 100644 --- a/src/backup/datastore.rs +++ b/src/backup/datastore.rs @@ -84,6 +84,15 @@ impl DataStore { }) } + pub fn get_chunk_iterator( + &self, + ) -> Result< + impl Iterator>, + Error + > { + self.chunk_store.get_chunk_iterator() + } + pub fn create_fixed_writer>(&self, filename: P, size: usize, chunk_size: usize) -> Result { let index = FixedIndexWriter::create(self.chunk_store.clone(), filename.as_ref(), size, chunk_size)?;