pub fn load_latest_checkpoint(dir: &Path) -> Result<Option<Vec<u8>>, RaftError>Expand description
Scan dir for <end_offset>-<epoch>.checkpoint artifacts, pick the highest
(end_offset, epoch), and return its raw bytes.
Returns None when the directory is absent or holds no checkpoint. Unlike
snapshot::load_latest, this reads only the .checkpoint (the .meta
sidecar is gone in this engine — the durable epoch lives in the quorum-state
file).
§Errors
Returns an error when the selected checkpoint file cannot be read.