pub fn arm_fail_next(n: u32)Available on crate feature
fault-injection only.Expand description
Arm the “fail the next N real commits” hook. The next n calls to the
real commit path (crate::try_commit_range / crate::commit_range)
return Err/false without touching the OS. n == 0 disarms.
Inert under the aligned_vmem_mock cfg — see the module doc.
Uses Relaxed, not Release like arm_fail_at: FAIL_NEXT carries no
payload to publish across threads, so there is nothing a stronger ordering
would protect.
Checked BEFORE arm_fail_at’s hook (this hook has priority).