docs.rs failed to build axess-clock-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
axess-clock
Injectable Clock trait for deterministic simulation testing (DST). Foundational primitive used by Axess and adjacent crates.
Production code depends on the Clock trait. Tests inject MockClock to make time-dependent behaviour reproducible; TTL expiry, lockout windows, OTP step counters, refresh-token rotation, audit timestamps.
Usage
use ;
use Arc;
use Duration;
// Production:
let clock: = new;
// Tests:
let mock = default;
let clock: = new;
mock.advance; // wall clock jumps forward
Clock::now() returns chrono::DateTime<chrono::Utc>. Clock::monotonic_now() returns a std::time::Instant-equivalent backed by the same logical timeline so monotonic-only callers stay DST-pinned too.
Licence
Dual-licensed under MIT and Apache-2.0.