Check if a content chunk exists in the store (by its content hash). This is used during delta push to determine which chunks the server already has without transferring them.
(&self, chunk_hash: &[u8; 32])
| 268 | /// This is used during delta push to determine which chunks the server |
| 269 | /// already has without transferring them. |
| 270 | pub fn has_content_chunk(&self, chunk_hash: &[u8; 32]) -> RedbStoreResult<bool> { |
| 271 | let txn = self.db().begin_read()?; |
| 272 | let table = txn.open_table(tables::CONTENT_CHUNKS)?; |
| 273 | Ok(table.get(chunk_hash)?.is_some()) |
| 274 | } |
| 275 | |
| 276 | /// Get the chunk manifest for a change. |
| 277 | /// |