Skip to main content

qubit_clock/test_util/
timer_failure_point.rs

1// =============================================================================
2//    Copyright (c) 2025 - 2026 Haixing Hu.
3//
4//    SPDX-License-Identifier: Apache-2.0
5//
6//    Licensed under the Apache License, Version 2.0.
7// =============================================================================
8//! Defines the Timer lifecycle point where a test failure is injected.
9
10/// Selects which stage of a Timer operation reports the configured failure.
11#[derive(Clone, Copy, Debug, Eq, PartialEq)]
12#[non_exhaustive]
13pub enum TimerFailurePoint {
14    /// `Timer::at` rejects the deadline without returning a future.
15    Registration,
16    /// `Timer::at` succeeds and its returned future reports the failure.
17    Completion,
18}