Last log term.
(&self)
| 49 | |
| 50 | /// Last log term. |
| 51 | pub fn last_term(&self) -> u64 { |
| 52 | self.entries |
| 53 | .last() |
| 54 | .map(|e| e.term) |
| 55 | .unwrap_or(self.snapshot_term) |
| 56 | } |
| 57 | |
| 58 | /// Get the term at a given index. |
| 59 | pub fn term_at(&self, index: u64) -> Option<u64> { |
no test coverage detected