pub struct PlanStep { /* private fields */ }Expand description
A single step within a Plan, describing one unit of work.
Steps are executed in order by the agent. Each step can be either
inline (executed directly by the current Run) or delegated
(spawning a sub-Task via the task field). See module documentation
for context tracking and recursive decomposition details.
Implementations§
Source§impl PlanStep
impl PlanStep
pub fn new(description: impl Into<String>) -> Self
pub fn description(&self) -> &str
pub fn inputs(&self) -> Option<&Value>
pub fn outputs(&self) -> Option<&Value>
pub fn checks(&self) -> Option<&Value>
Sourcepub fn status(&self) -> Option<&StepStatus>
pub fn status(&self) -> Option<&StepStatus>
Returns the current step status (last entry in the history).
Returns None only if statuses is empty, which should not
happen for objects created via PlanStep::new (seeds with
Pending), but may occur for malformed deserialized data.
Sourcepub fn statuses(&self) -> &[StepStatusEntry]
pub fn statuses(&self) -> &[StepStatusEntry]
Returns the full chronological status history.
Sourcepub fn set_status(&mut self, status: StepStatus)
pub fn set_status(&mut self, status: StepStatus)
Transitions the step to a new status, appending to the history.
Sourcepub fn set_status_with_reason(
&mut self,
status: StepStatus,
reason: impl Into<String>,
)
pub fn set_status_with_reason( &mut self, status: StepStatus, reason: impl Into<String>, )
Transitions the step to a new status with a reason.
pub fn set_inputs(&mut self, inputs: Option<Value>)
pub fn set_outputs(&mut self, outputs: Option<Value>)
pub fn set_checks(&mut self, checks: Option<Value>)
Sourcepub fn iframes(&self) -> &[u64]
pub fn iframes(&self) -> &[u64]
Returns the pipeline frame IDs this step consumed as input context.
Sourcepub fn oframes(&self) -> &[u64]
pub fn oframes(&self) -> &[u64]
Returns the pipeline frame IDs this step produced as output context.
Sourcepub fn set_iframes(&mut self, ids: Vec<u64>)
pub fn set_iframes(&mut self, ids: Vec<u64>)
Records the pipeline frame IDs this step consumed as input.
Sourcepub fn set_oframes(&mut self, ids: Vec<u64>)
pub fn set_oframes(&mut self, ids: Vec<u64>)
Records the pipeline frame IDs this step produced as output.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PlanStep
impl<'de> Deserialize<'de> for PlanStep
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 PlanStep
impl StructuralPartialEq for PlanStep
Auto Trait Implementations§
impl Freeze for PlanStep
impl RefUnwindSafe for PlanStep
impl Send for PlanStep
impl Sync for PlanStep
impl Unpin for PlanStep
impl UnsafeUnpin for PlanStep
impl UnwindSafe for PlanStep
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FileLoadStore for Twhere
T: Serialize + for<'a> Deserialize<'a>,
impl<T> FileLoadStore for Twhere
T: Serialize + for<'a> Deserialize<'a>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more