qubit_validator/report/validation_limits.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
9//! Bounds applied while collecting validation results.
10
11/// Explicit bounds applied while collecting a validation report.
12///
13/// These limits bound retained violation and skipped-entry counts only. They
14/// do not bound input sizes, validation work, dependency path sizes, the
15/// number of prerequisite references in an outcome, or memory already used to
16/// construct an outcome. Applications should enforce those resource policies
17/// at their input and execution boundaries.
18///
19/// # Examples
20///
21/// ```
22/// use qubit_validator::ValidationLimits;
23///
24/// let limits = ValidationLimits {
25/// max_violations: Some(10),
26/// max_skipped: None,
27/// };
28/// assert_eq!(limits.max_violations, Some(10));
29/// ```
30#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
31pub struct ValidationLimits {
32 /// Maximum retained original violations; prerequisite references consume no
33 /// additional capacity. `None` means unlimited.
34 pub max_violations: Option<usize>,
35 /// Maximum skipped entries; `None` means unlimited.
36 pub max_skipped: Option<usize>,
37}