qubit_fs_testkit/fixture_support.rs
1// =============================================================================
2// Copyright (c) 2026 Haixing Hu.
3//
4// SPDX-License-Identifier: Apache-2.0
5//
6// Licensed under the Apache License, Version 2.0.
7// =============================================================================
8//! Typed availability results for provider-owned fixture probes.
9
10/// Distinguishes a supported fixture probe from one the fixture cannot offer.
11///
12/// # Type Parameters
13///
14/// * `T` - Value returned when the fixture supports the probe.
15///
16/// # Examples
17///
18/// ```
19/// use qubit_fs_testkit::FixtureSupport;
20///
21/// let supported = FixtureSupport::Supported(7_u32);
22/// assert_eq!(supported, FixtureSupport::Supported(7));
23/// assert_eq!(FixtureSupport::<u32>::Unsupported, FixtureSupport::Unsupported);
24/// ```
25#[must_use]
26#[derive(Clone, Debug, Eq, PartialEq)]
27pub enum FixtureSupport<T> {
28 /// The fixture supplied the requested provider-specific value.
29 Supported(
30 /// Provider-specific value supplied for this supported probe.
31 T,
32 ),
33 /// The fixture cannot supply this optional probe.
34 Unsupported,
35}