#[non_exhaustive]pub struct ExplorationLimits {
pub max_states: usize,
pub max_depth: usize,
pub max_commands_per_state: usize,
}Expand description
Bounds on a breadth-first exploration (spec §8.5).
Exploration is bounded on purpose: a workflow with free-text fields has an
infinite state space, so the model offers a finite menu of candidate
commands and these limits cap the search on top of it. Hitting a limit is
not a failure; it marks the report
truncated so a test can
tell “no violations found” from “no violations found so far”.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_states: usizeMaximum number of distinct states to visit.
max_depth: usizeMaximum number of commands on the path from an initial state.
max_commands_per_state: usizeMaximum number of candidate commands tried in one state.
Implementations§
Source§impl ExplorationLimits
impl ExplorationLimits
Sourcepub const fn new(
max_states: usize,
max_depth: usize,
max_commands_per_state: usize,
) -> Self
pub const fn new( max_states: usize, max_depth: usize, max_commands_per_state: usize, ) -> Self
Builds explicit limits.
Sourcepub const fn smoke() -> Self
pub const fn smoke() -> Self
Limits for a fast check in a unit test: 128 states, depth 6, 8 commands.
Sourcepub const fn generous() -> Self
pub const fn generous() -> Self
Limits for an exhaustive run in CI: 8192 states, depth 32, 32 commands.
Sourcepub const fn with_max_states(self, max_states: usize) -> Self
pub const fn with_max_states(self, max_states: usize) -> Self
Returns a copy with another state budget.
Sourcepub const fn with_max_depth(self, max_depth: usize) -> Self
pub const fn with_max_depth(self, max_depth: usize) -> Self
Returns a copy with another depth budget.
Sourcepub const fn with_max_commands_per_state(
self,
max_commands_per_state: usize,
) -> Self
pub const fn with_max_commands_per_state( self, max_commands_per_state: usize, ) -> Self
Returns a copy with another per-state command budget.
Trait Implementations§
Source§impl Clone for ExplorationLimits
impl Clone for ExplorationLimits
impl Copy for ExplorationLimits
Source§impl Debug for ExplorationLimits
impl Debug for ExplorationLimits
Source§impl Default for ExplorationLimits
impl Default for ExplorationLimits
Source§impl<'de> Deserialize<'de> for ExplorationLimits
impl<'de> Deserialize<'de> for ExplorationLimits
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ExplorationLimits
Source§impl PartialEq for ExplorationLimits
impl PartialEq for ExplorationLimits
Source§impl Serialize for ExplorationLimits
impl Serialize for ExplorationLimits
impl StructuralPartialEq for ExplorationLimits
Auto Trait Implementations§
impl Freeze for ExplorationLimits
impl RefUnwindSafe for ExplorationLimits
impl Send for ExplorationLimits
impl Sync for ExplorationLimits
impl Unpin for ExplorationLimits
impl UnsafeUnpin for ExplorationLimits
impl UnwindSafe for ExplorationLimits
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.