pub struct TerminalIndex { /* private fields */ }Expand description
A view of all runs in terminal states.
This structure provides filtering and traversal over runs that have reached a terminal state. Terminal runs cannot transition to any other state and represent completed task execution outcomes.
Implementations§
Source§impl TerminalIndex
impl TerminalIndex
Sourcepub fn from_runs(runs: Vec<RunInstance>) -> Self
pub fn from_runs(runs: Vec<RunInstance>) -> Self
Creates a terminal index from a vector of runs.
All runs must be in a terminal state (Completed, Failed, or
Canceled).
Sourcepub fn runs(&self) -> &[RunInstance]
pub fn runs(&self) -> &[RunInstance]
Returns all runs in the terminal index.
Sourcepub fn completed(&self) -> Vec<&RunInstance>
pub fn completed(&self) -> Vec<&RunInstance>
Returns only completed runs.
Sourcepub fn failed(&self) -> Vec<&RunInstance>
pub fn failed(&self) -> Vec<&RunInstance>
Returns only failed runs.
Sourcepub fn canceled(&self) -> Vec<&RunInstance>
pub fn canceled(&self) -> Vec<&RunInstance>
Returns only canceled runs.
Trait Implementations§
Source§impl Clone for TerminalIndex
impl Clone for TerminalIndex
Source§fn clone(&self) -> TerminalIndex
fn clone(&self) -> TerminalIndex
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 TerminalIndex
impl Debug for TerminalIndex
Source§impl Default for TerminalIndex
impl Default for TerminalIndex
Source§fn default() -> TerminalIndex
fn default() -> TerminalIndex
Returns the “default value” for a type. Read more
Source§impl From<&[RunInstance]> for TerminalIndex
impl From<&[RunInstance]> for TerminalIndex
Source§fn from(runs: &[RunInstance]) -> Self
fn from(runs: &[RunInstance]) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TerminalIndex
impl PartialEq for TerminalIndex
impl Eq for TerminalIndex
impl StructuralPartialEq for TerminalIndex
Auto Trait Implementations§
impl Freeze for TerminalIndex
impl RefUnwindSafe for TerminalIndex
impl Send for TerminalIndex
impl Sync for TerminalIndex
impl Unpin for TerminalIndex
impl UnsafeUnpin for TerminalIndex
impl UnwindSafe for TerminalIndex
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