pub struct WorkflowSimulator { /* private fields */ }Expand description
The workflow simulation engine.
Implementations§
Source§impl WorkflowSimulator
impl WorkflowSimulator
Sourcepub fn new(config: SimulationConfig) -> Self
pub fn new(config: SimulationConfig) -> Self
Create a new simulator with the given config.
Sourcepub fn default_simulator() -> Self
pub fn default_simulator() -> Self
Create a simulator with default config (all nodes succeed).
Sourcepub fn simulate(&self, dag: &WorkflowDag) -> Result<SimulationResult, DagError>
pub fn simulate(&self, dag: &WorkflowDag) -> Result<SimulationResult, DagError>
Run the simulation on a DAG without modifying it.
§Errors
Returns DagError if the DAG contains a cycle.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WorkflowSimulator
impl RefUnwindSafe for WorkflowSimulator
impl Send for WorkflowSimulator
impl Sync for WorkflowSimulator
impl Unpin for WorkflowSimulator
impl UnsafeUnpin for WorkflowSimulator
impl UnwindSafe for WorkflowSimulator
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