pub struct ChainStepResult {
pub index: usize,
pub instruction: String,
pub executed: bool,
pub success: bool,
pub action_taken: Option<String>,
pub error: Option<String>,
pub duration_ms: u64,
pub extracted: Option<Value>,
pub usage: AutomationUsage,
pub retries: usize,
}Expand description
Result of a single step in an action chain.
Fields§
§index: usizeStep index (0-based).
instruction: StringThe instruction that was executed.
executed: boolWhether the step was executed (false if condition not met).
success: boolWhether the step succeeded (if executed).
action_taken: Option<String>Action taken (if executed).
error: Option<String>Error message (if failed).
duration_ms: u64Duration in milliseconds.
extracted: Option<Value>Extracted data (if extraction was requested).
usage: AutomationUsageToken usage for this step.
retries: usizeNumber of retries used.
Implementations§
Source§impl ChainStepResult
impl ChainStepResult
Sourcepub fn executed(
index: usize,
instruction: impl Into<String>,
success: bool,
) -> Self
pub fn executed( index: usize, instruction: impl Into<String>, success: bool, ) -> Self
Create a result for an executed step.
Sourcepub fn skipped(index: usize, instruction: impl Into<String>) -> Self
pub fn skipped(index: usize, instruction: impl Into<String>) -> Self
Create a result for a skipped step.
Sourcepub fn with_action(self, action: impl Into<String>) -> Self
pub fn with_action(self, action: impl Into<String>) -> Self
Set action taken.
Sourcepub fn with_error(self, error: impl Into<String>) -> Self
pub fn with_error(self, error: impl Into<String>) -> Self
Set error.
Sourcepub fn with_duration(self, ms: u64) -> Self
pub fn with_duration(self, ms: u64) -> Self
Set duration.
Sourcepub fn with_extracted(self, data: Value) -> Self
pub fn with_extracted(self, data: Value) -> Self
Set extracted data.
Sourcepub fn with_usage(self, usage: AutomationUsage) -> Self
pub fn with_usage(self, usage: AutomationUsage) -> Self
Set usage.
Sourcepub fn with_retries(self, retries: usize) -> Self
pub fn with_retries(self, retries: usize) -> Self
Set retries.
Trait Implementations§
Source§impl Clone for ChainStepResult
impl Clone for ChainStepResult
Source§fn clone(&self) -> ChainStepResult
fn clone(&self) -> ChainStepResult
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 ChainStepResult
impl Debug for ChainStepResult
Source§impl Default for ChainStepResult
impl Default for ChainStepResult
Source§fn default() -> ChainStepResult
fn default() -> ChainStepResult
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ChainStepResult
impl<'de> Deserialize<'de> for ChainStepResult
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 ChainStepResult
impl RefUnwindSafe for ChainStepResult
impl Send for ChainStepResult
impl Sync for ChainStepResult
impl Unpin for ChainStepResult
impl UnwindSafe for ChainStepResult
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