pub struct ExecutionPlan {
pub workflow: String,
pub steps: Vec<PlannedStep>,
pub estimated_duration: Option<Duration>,
pub max_depth: u32,
pub truncated: bool,
pub incomplete_reason: Option<String>,
}Expand description
The full plan for one workflow and one input payload.
§Examples
use ironflow_engine::plan::ExecutionPlan;
let plan = ExecutionPlan {
workflow: "deploy".to_string(),
steps: Vec::new(),
estimated_duration: None,
max_depth: 3,
truncated: false,
incomplete_reason: None,
};
assert!(plan.steps.is_empty());Fields§
§workflow: StringWorkflow the plan was built for.
steps: Vec<PlannedStep>Steps the run is expected to create, in execution order.
estimated_duration: Option<Duration>Sum of the step estimates, counting each parallel wave once.
max_depth: u32Sub-workflow expansion depth used for this plan.
truncated: booltrue when the step cap or the depth limit cut the plan short.
incomplete_reason: Option<String>Why the plan stopped early (handler error, cap, depth limit).
Implementations§
Source§impl ExecutionPlan
impl ExecutionPlan
Sourcepub fn estimated_duration_ms(&self) -> Option<u64>
pub fn estimated_duration_ms(&self) -> Option<u64>
Total estimate in whole milliseconds, when the plan has one.
§Examples
use std::time::Duration;
use ironflow_engine::plan::ExecutionPlan;
let plan = ExecutionPlan {
workflow: "deploy".to_string(),
steps: Vec::new(),
estimated_duration: Some(Duration::from_millis(1500)),
max_depth: 3,
truncated: false,
incomplete_reason: None,
};
assert_eq!(plan.estimated_duration_ms(), Some(1500));Trait Implementations§
Source§impl Clone for ExecutionPlan
impl Clone for ExecutionPlan
Source§impl Debug for ExecutionPlan
impl Debug for ExecutionPlan
Source§impl<'de> Deserialize<'de> for ExecutionPlan
impl<'de> Deserialize<'de> for ExecutionPlan
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExecutionPlan
impl RefUnwindSafe for ExecutionPlan
impl Send for ExecutionPlan
impl Sync for ExecutionPlan
impl Unpin for ExecutionPlan
impl UnsafeUnpin for ExecutionPlan
impl UnwindSafe for ExecutionPlan
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