pub struct StepResult {
pub step_id: String,
pub status: StepStatus,
pub message: Option<String>,
/* private fields */
}Expand description
The outcome of a single step execution.
Fields§
§step_id: StringUnique identifier for the step.
status: StepStatusFinal status of the step.
message: Option<String>Optional human-readable message.
Implementations§
Source§impl StepResult
impl StepResult
Sourcepub fn new(
step_id: impl Into<String>,
status: StepStatus,
elapsed_ms: u64,
) -> Self
pub fn new( step_id: impl Into<String>, status: StepStatus, elapsed_ms: u64, ) -> Self
Create a new StepResult.
Sourcepub fn with_message(self, msg: impl Into<String>) -> Self
pub fn with_message(self, msg: impl Into<String>) -> Self
Attach a message to this result.
Sourcepub fn elapsed_ms(&self) -> u64
pub fn elapsed_ms(&self) -> u64
Wall-clock elapsed time in milliseconds.
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Convenience: was this step successful?
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StepResult
impl RefUnwindSafe for StepResult
impl Send for StepResult
impl Sync for StepResult
impl Unpin for StepResult
impl UnsafeUnpin 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