pub struct TaskCounts {
pub queued: usize,
pub running: usize,
pub done: usize,
pub failed: usize,
pub held: usize,
pub blocked: usize,
}Expand description
How many tasks sit in each TaskStatus, for a dashboard tile — never a
per-task view, so it carries no ids.
Fields§
§queued: usizeWaiting to be claimed.
running: usizeClaimed; a run is in flight.
done: usizeA run finished and its gate passed.
failed: usizeA run finished without passing, and attempts remain.
held: usizeOut of attempts, or held by hand.
blocked: usizeWaiting on another task or an unanswered question.
Implementations§
Source§impl TaskCounts
impl TaskCounts
Sourcepub fn of(tasks: &[Task]) -> Self
pub fn of(tasks: &[Task]) -> Self
Tally tasks by status. A pure function over whatever Queue::list
already read, so it needs no root of its own and stays trivially
testable against a hand-built slice.
Trait Implementations§
Source§impl Clone for TaskCounts
impl Clone for TaskCounts
impl Copy for TaskCounts
Source§impl Debug for TaskCounts
impl Debug for TaskCounts
Source§impl Default for TaskCounts
impl Default for TaskCounts
impl Eq for TaskCounts
Source§impl PartialEq for TaskCounts
impl PartialEq for TaskCounts
impl StructuralPartialEq for TaskCounts
Auto Trait Implementations§
impl Freeze for TaskCounts
impl RefUnwindSafe for TaskCounts
impl Send for TaskCounts
impl Sync for TaskCounts
impl Unpin for TaskCounts
impl UnsafeUnpin for TaskCounts
impl UnwindSafe for TaskCounts
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more