qubit_argument/argument/constraint/index_role.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//! Index roles used by indexed argument validation.
9
10/// The role of an index in an indexed argument operation.
11///
12/// ```compile_fail
13/// #![deny(unused_must_use)]
14/// use qubit_argument::IndexRole;
15///
16/// IndexRole::Element;
17/// ```
18#[must_use]
19#[derive(Debug, Clone, Copy, PartialEq, Eq)]
20pub enum IndexRole {
21 /// Identifies an existing element and therefore excludes the collection
22 /// end.
23 Element,
24 /// Identifies an insertion or boundary position, including the collection
25 /// end.
26 Position,
27}