(&mut self, index: u64, term: u64)
| 74 | } |
| 75 | |
| 76 | fn compact(&mut self, index: u64, term: u64) -> Result<()> { |
| 77 | self.entries.retain(|e| e.index > index); |
| 78 | self.snapshot_index = index; |
| 79 | self.snapshot_term = term; |
| 80 | Ok(()) |
| 81 | } |
| 82 | |
| 83 | fn snapshot_metadata(&self) -> (u64, u64) { |
| 84 | (self.snapshot_index, self.snapshot_term) |
no outgoing calls