pub fn mirror(
cfg: &HubConfig,
brain: &str,
dest: &Path,
) -> LinkResult<MirrorReport>Expand description
Replicate a brain with full verification (link.md §5.4 over the WHOLE chain, not just the head): every entry’s signature, hash, sequence contiguity, prev-hash linkage, rotation chain, and exact signed pack are checked in a sibling staging directory. Only then is the old mirror swapped out through an atomic directory exchange. Every stage, install, and cleanup operation is relative to one held no-follow parent-directory capability, so renaming an ancestor cannot redirect any write or deletion.