pub struct StepResultLog { /* private fields */ }Expand description
A collection of StepResults grouped by workflow run identifier.
Implementations§
Source§impl StepResultLog
impl StepResultLog
Sourcepub fn add(&mut self, run_id: impl Into<String>, result: StepResult)
pub fn add(&mut self, run_id: impl Into<String>, result: StepResult)
Append a result for the given run_id.
Sourcepub fn success_rate(&self, run_id: &str) -> Option<f64>
pub fn success_rate(&self, run_id: &str) -> Option<f64>
Fraction of terminal steps that succeeded for a given run.
Returns None if the run is unknown or has no terminal steps.
Sourcepub fn failed_steps(&self, run_id: &str) -> Vec<&StepResult>
pub fn failed_steps(&self, run_id: &str) -> Vec<&StepResult>
Return only the failed steps for a given run.
Sourcepub fn total_entries(&self) -> usize
pub fn total_entries(&self) -> usize
Total number of step results recorded across all runs.
Trait Implementations§
Source§impl Debug for StepResultLog
impl Debug for StepResultLog
Source§impl Default for StepResultLog
impl Default for StepResultLog
Source§fn default() -> StepResultLog
fn default() -> StepResultLog
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StepResultLog
impl RefUnwindSafe for StepResultLog
impl Send for StepResultLog
impl Sync for StepResultLog
impl Unpin for StepResultLog
impl UnsafeUnpin for StepResultLog
impl UnwindSafe for StepResultLog
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