Expand description
Runtime abstraction: clock, sleeping, and RNG behind one object-safe trait.
Structs§
- Manual
Clock - A virtual clock for deterministic tests.
now()advances only viaManualClock::advance; sleeps registered on it resolve when crossed. - Test
Core - Deterministic
Corefor tests: virtual clock + seeded RNG, no real sleeps. - Tokio
Core - Default production
Core: tokio timers + a fast non-crypto RNG for jitter.
Traits§
- Core
- The policy engine’s access to time, sleeping, and randomness.
Type Aliases§
- BoxFuture
- A boxed future.
Core::sleepreturns this so the trait stays object-safe (Arc<dyn Core>works); the box is on the cold backoff path only. - Default
Core - The
Coreused byExecutionPolicy::builder().build().