pub struct SimulationConfig {
pub simulated_outputs: HashMap<String, HashMap<String, Value>>,
pub failing_task_types: HashSet<String>,
pub estimated_durations: HashMap<String, Duration>,
pub continue_on_failure: bool,
pub max_nodes: usize,
pub condition_overrides: HashMap<String, bool>,
}Expand description
Configuration for a simulation run.
Fields§
§simulated_outputs: HashMap<String, HashMap<String, Value>>Simulated outputs per node task type. When a node of this task type runs, these outputs are written to its output map.
failing_task_types: HashSet<String>Task types that should be marked as failed during simulation.
estimated_durations: HashMap<String, Duration>Estimated duration per task type (for cost/time estimation).
continue_on_failure: boolWhether to continue tracing after a simulated failure.
max_nodes: usizeMaximum number of nodes to trace (safety limit).
condition_overrides: HashMap<String, bool>Condition evaluator: maps condition string to boolean result. If not provided, all conditions default to true.
Implementations§
Source§impl SimulationConfig
impl SimulationConfig
Sourcepub fn with_outputs(
self,
task_type: impl Into<String>,
outputs: HashMap<String, Value>,
) -> Self
pub fn with_outputs( self, task_type: impl Into<String>, outputs: HashMap<String, Value>, ) -> Self
Add simulated outputs for a task type.
Sourcepub fn with_failing_type(self, task_type: impl Into<String>) -> Self
pub fn with_failing_type(self, task_type: impl Into<String>) -> Self
Mark a task type as failing.
Sourcepub fn with_duration(
self,
task_type: impl Into<String>,
duration: Duration,
) -> Self
pub fn with_duration( self, task_type: impl Into<String>, duration: Duration, ) -> Self
Set estimated duration for a task type.
Sourcepub fn with_continue_on_failure(self, cont: bool) -> Self
pub fn with_continue_on_failure(self, cont: bool) -> Self
Set whether to continue after failure.
Sourcepub fn with_condition_override(
self,
condition: impl Into<String>,
value: bool,
) -> Self
pub fn with_condition_override( self, condition: impl Into<String>, value: bool, ) -> Self
Override a condition expression to return a specific boolean.
Trait Implementations§
Source§impl Clone for SimulationConfig
impl Clone for SimulationConfig
Source§fn clone(&self) -> SimulationConfig
fn clone(&self) -> SimulationConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SimulationConfig
impl Debug for SimulationConfig
Auto Trait Implementations§
impl Freeze for SimulationConfig
impl RefUnwindSafe for SimulationConfig
impl Send for SimulationConfig
impl Sync for SimulationConfig
impl Unpin for SimulationConfig
impl UnsafeUnpin for SimulationConfig
impl UnwindSafe for SimulationConfig
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