pub struct StepResult {
pub success: bool,
pub output: Option<Value>,
pub error: Option<String>,
pub duration_ms: u64,
}Expand description
Result of executing a single step.
Fields§
§success: boolWhether the step succeeded.
output: Option<Value>Output from the step, if any.
error: Option<String>Error message if failed.
duration_ms: u64Duration in milliseconds.
Implementations§
Source§impl StepResult
impl StepResult
Sourcepub fn success() -> StepResult
pub fn success() -> StepResult
Create a successful result.
Sourcepub fn success_with_output(output: Value) -> StepResult
pub fn success_with_output(output: Value) -> StepResult
Create a successful result with output.
Sourcepub fn failure(error: impl Into<String>) -> StepResult
pub fn failure(error: impl Into<String>) -> StepResult
Create a failed result.
Sourcepub fn with_duration(self, ms: u64) -> StepResult
pub fn with_duration(self, ms: u64) -> StepResult
Set the duration.
Trait Implementations§
Source§impl Clone for StepResult
impl Clone for StepResult
Source§fn clone(&self) -> StepResult
fn clone(&self) -> StepResult
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 StepResult
impl Debug for StepResult
Source§impl<'de> Deserialize<'de> for StepResult
impl<'de> Deserialize<'de> for StepResult
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StepResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StepResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for StepResult
impl Serialize for StepResult
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 StepResult
impl RefUnwindSafe for StepResult
impl Send for StepResult
impl Sync for StepResult
impl Unpin for StepResult
impl UnwindSafe for StepResult
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