pub struct ChildState { /* private fields */ }Expand description
Immutable snapshot of a single child task’s run states.
Implementations§
Source§impl ChildState
impl ChildState
Sourcepub fn new(task_id: TaskId, run_states: Vec<(RunId, RunState)>) -> Self
pub fn new(task_id: TaskId, run_states: Vec<(RunId, RunState)>) -> Self
Creates a new child state entry.
A child with an empty run_states vec (runs not yet derived) will have
all_terminal == false. This is intentional: the snapshot reflects the
true state — a child whose runs have not yet been derived is not
complete. Callers checking ChildrenSnapshot::all_children_terminal
will correctly treat such children as incomplete.
Sourcepub fn run_states(&self) -> &[(RunId, RunState)]
pub fn run_states(&self) -> &[(RunId, RunState)]
Returns all run instances for this child task, with their current states.
Sourcepub fn all_terminal(&self) -> bool
pub fn all_terminal(&self) -> bool
Returns whether ALL runs for this child are in terminal states.
Trait Implementations§
Source§impl Clone for ChildState
impl Clone for ChildState
Source§fn clone(&self) -> ChildState
fn clone(&self) -> ChildState
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 moreAuto Trait Implementations§
impl Freeze for ChildState
impl RefUnwindSafe for ChildState
impl Send for ChildState
impl Sync for ChildState
impl Unpin for ChildState
impl UnsafeUnpin for ChildState
impl UnwindSafe for ChildState
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