1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// =============================================================================
// Copyright (c) 2026 Haixing Hu.
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0.
// =============================================================================
//! Typed preparation evidence supplied by an isolated provider fixture.
/// Separates a prepared request from applicability and missing instrumentation.
///
/// Preparation failures use `FixtureResult::Err`. A fixture cannot turn a
/// backend error into an inapplicability declaration. The suite validates
/// declarations against the provider's capability guarantees.
///
/// # Type Parameters
///
/// * `T` is the prepared request data the fixture provides to the scenario.
///
/// # Examples
///
/// ```
/// use qubit_fs_testkit::FixturePreparation;
///
/// let ready = FixturePreparation::Ready("payload");
/// assert!(matches!(ready, FixturePreparation::Ready(_)));
/// ```
#[must_use]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum FixturePreparation<T> {
/// The request and independent initial state are ready to exercise.
///
/// The value contains the prepared request data supplied by the fixture.
Ready(
/// Prepared request data that the suite will exercise.
T,
),
/// The scenario does not exist in this provider configuration.
NotApplicable {
/// Concrete provider restriction that excludes this scenario.
reason: String,
},
/// The scenario applies, but fixture evidence is unavailable.
Unavailable {
/// The missing setup or observation needed to perform the check.
reason: String,
},
}