Extract the most recently written [`segment::Metadata`] from the commitlog in `repo`. Returns `None` if the commitlog is empty. Note that this function validates the most recent segment, which entails traversing it from the start. The function can be used instead of the pattern: ```ignore let log = Commitlog::open(..)?; let max_offset = log.max_committed_offset(); ``` like so: ```ignore let
(root: CommitLogDir)
| 608 | /// |
| 609 | /// Unlike `open`, no segment will be created in an empty `repo`. |
| 610 | pub fn committed_meta(root: CommitLogDir) -> io::Result<Option<CommittedMeta>> { |
| 611 | commitlog::committed_meta(repo::Fs::new(root, None)?) |
| 612 | } |
| 613 | |
| 614 | /// Obtain an iterator which traverses the commitlog located at the `root` |
| 615 | /// directory from the start, yielding [`StoredCommit`]s. |
nothing calls this directly
no test coverage detected
searching dependent graphs…