pub struct ChildrenSnapshot { /* private fields */ }Expand description
Immutable point-in-time snapshot of all child tasks’ states.
Provided to Coordinator-pattern handlers so they can check progress and decide what to do next without accessing shared mutable state.
Implementations§
Source§impl ChildrenSnapshot
impl ChildrenSnapshot
Sourcepub fn new(children: Vec<ChildState>) -> ChildrenSnapshot
pub fn new(children: Vec<ChildState>) -> ChildrenSnapshot
Creates a snapshot from a list of child states.
Sourcepub fn children(&self) -> &[ChildState]
pub fn children(&self) -> &[ChildState]
Returns all child states in this snapshot.
Sourcepub fn all_children_terminal(&self) -> bool
pub fn all_children_terminal(&self) -> bool
Returns true if all children have all runs in terminal states.
Sourcepub fn get(&self, task_id: TaskId) -> Option<&ChildState>
pub fn get(&self, task_id: TaskId) -> Option<&ChildState>
Returns the child state for the given task, if present.
Trait Implementations§
Source§impl Clone for ChildrenSnapshot
impl Clone for ChildrenSnapshot
Source§fn clone(&self) -> ChildrenSnapshot
fn clone(&self) -> ChildrenSnapshot
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 ChildrenSnapshot
impl Debug for ChildrenSnapshot
Source§impl Default for ChildrenSnapshot
impl Default for ChildrenSnapshot
Source§fn default() -> ChildrenSnapshot
fn default() -> ChildrenSnapshot
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChildrenSnapshot
impl RefUnwindSafe for ChildrenSnapshot
impl Send for ChildrenSnapshot
impl Sync for ChildrenSnapshot
impl Unpin for ChildrenSnapshot
impl UnsafeUnpin for ChildrenSnapshot
impl UnwindSafe for ChildrenSnapshot
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