pub struct RunConfig {
pub schema: SchemaConfig,
pub predicate: Option<ToolPredicate>,
pub assertions: AssertionSet,
pub state_machine: StateMachineConfig,
pub pre_run_hook: Option<PreRunHook>,
}Expand description
Top-level configuration for executing a tooltest run.
Fields§
§schema: SchemaConfigMCP schema configuration.
predicate: Option<ToolPredicate>Optional predicate to filter eligible tools.
assertions: AssertionSetAssertion rules to evaluate during the run.
state_machine: StateMachineConfigState-machine generator configuration.
pre_run_hook: Option<PreRunHook>Optional pre-run hook to execute before validation and each case.
Implementations§
Source§impl RunConfig
impl RunConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a run configuration with defaults for schema and assertions.
The state-machine generator is always used, and it is strict by default (required values must come from the corpus unless lenient sourcing is enabled).
Sourcepub fn with_schema(self, schema: SchemaConfig) -> Self
pub fn with_schema(self, schema: SchemaConfig) -> Self
Sets the schema configuration.
Sourcepub fn with_predicate(self, predicate: ToolPredicate) -> Self
pub fn with_predicate(self, predicate: ToolPredicate) -> Self
Sets the tool predicate used for eligibility filtering.
Sourcepub fn with_assertions(self, assertions: AssertionSet) -> Self
pub fn with_assertions(self, assertions: AssertionSet) -> Self
Sets the assertion rules for the run.
Sourcepub fn with_state_machine(self, state_machine: StateMachineConfig) -> Self
pub fn with_state_machine(self, state_machine: StateMachineConfig) -> Self
Sets the state-machine generator configuration.
Sourcepub fn with_pre_run_hook(self, hook: PreRunHook) -> Self
pub fn with_pre_run_hook(self, hook: PreRunHook) -> Self
Sets the pre-run hook for this run.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RunConfig
impl !RefUnwindSafe for RunConfig
impl Send for RunConfig
impl Sync for RunConfig
impl Unpin for RunConfig
impl !UnwindSafe for RunConfig
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
Mutably borrows from an owned value. Read more