pub fn apply_jitter(
cap: Duration,
mode: JitterMode,
rng: &mut dyn FnMut() -> u64,
) -> DurationExpand description
Apply mode to a computed backoff cap.
Pure + seedable for tests: rng produces the next random u64
used to scale the cap when mode is JitterMode::Full. The
result is always <= cap so the max_backoff invariant holds.