pub struct PlannedStep {
pub id: String,
pub action: Value,
pub checkpoint: Option<Checkpoint>,
pub depends_on: Vec<String>,
pub description: Option<String>,
pub confidence: f64,
pub critical: bool,
}Expand description
A single step in an execution plan.
Fields§
§id: StringUnique identifier for this step.
action: ValueThe action to execute.
checkpoint: Option<Checkpoint>Optional checkpoint to verify after this step.
depends_on: Vec<String>IDs of steps this one depends on.
description: Option<String>Description of what this step does.
confidence: f64Confidence score (0.0 to 1.0).
critical: boolWhether this step is critical (plan fails if it fails).
Implementations§
Source§impl PlannedStep
impl PlannedStep
Sourcepub fn with_checkpoint(self, checkpoint: Checkpoint) -> PlannedStep
pub fn with_checkpoint(self, checkpoint: Checkpoint) -> PlannedStep
Add a checkpoint.
Sourcepub fn depends_on(self, step_id: impl Into<String>) -> PlannedStep
pub fn depends_on(self, step_id: impl Into<String>) -> PlannedStep
Add a dependency.
Sourcepub fn with_description(self, desc: impl Into<String>) -> PlannedStep
pub fn with_description(self, desc: impl Into<String>) -> PlannedStep
Add a description.
Sourcepub fn with_confidence(self, confidence: f64) -> PlannedStep
pub fn with_confidence(self, confidence: f64) -> PlannedStep
Set confidence.
Sourcepub fn with_critical(self, critical: bool) -> PlannedStep
pub fn with_critical(self, critical: bool) -> PlannedStep
Set whether step is critical.
Sourcepub fn from_json(value: &Value) -> Option<PlannedStep>
pub fn from_json(value: &Value) -> Option<PlannedStep>
Parse from LLM JSON response.
Trait Implementations§
Source§impl Clone for PlannedStep
impl Clone for PlannedStep
Source§fn clone(&self) -> PlannedStep
fn clone(&self) -> PlannedStep
Returns a duplicate of the value. Read more
1.0.0 · 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 PlannedStep
impl Debug for PlannedStep
Source§impl<'de> Deserialize<'de> for PlannedStep
impl<'de> Deserialize<'de> for PlannedStep
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PlannedStep, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PlannedStep, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PlannedStep
impl Serialize for PlannedStep
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for PlannedStep
impl RefUnwindSafe for PlannedStep
impl Send for PlannedStep
impl Sync for PlannedStep
impl Unpin for PlannedStep
impl UnsafeUnpin for PlannedStep
impl UnwindSafe for PlannedStep
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