pub fn commit_pdf_save(
store: &PdfSaveTokenStore,
token: &str,
target: Option<&Path>,
) -> Result<PdfCommitResult, CommitError>Expand description
Consumes token, re-checks the on-disk source for same-file saves, and atomically writes the
verified candidate to target (or back to the source path when None).
“Same file” is decided by filesystem identity, not by comparing path strings, and the whole
check-replace-invalidate sequence runs under a lock on the destination (see the module docs).
A commit that loses the race, or whose source changed, fails with
CommitError::Edit(PdfEditError::WriteConflict) and writes nothing.