pub struct Inventory { /* private fields */ }Expand description
One snapshot of the tasks and questions a blocked_by id can name.
Implementations§
Source§impl Inventory
impl Inventory
Sourcepub fn blocker_views(&self, task: &Task) -> Vec<BlockerView>
pub fn blocker_views(&self, task: &Task) -> Vec<BlockerView>
All direct blockers, including settled and unavailable records. Task links let the operator follow chains without hiding sibling blockers.
Sourcepub fn new(tasks: Vec<Task>, questions: &[Question]) -> Self
pub fn new(tasks: Vec<Task>, questions: &[Question]) -> Self
Build the snapshot. Callers take queue.list() and questions.list()
once, so a listing over many tasks never rescans the disk per task.
Sourcepub fn load(queue: &Queue, questions: &Questions) -> Self
pub fn load(queue: &Queue, questions: &Questions) -> Self
Include unreadable records and tombstones in id resolution; list() alone cannot prove uniqueness or absence.
Sourcepub fn load_with_tasks(
queue: &Queue,
questions: &Questions,
tasks: Vec<Task>,
) -> Self
pub fn load_with_tasks( queue: &Queue, questions: &Questions, tasks: Vec<Task>, ) -> Self
Reuse a listing already read by the caller. Still include tombstones and unreadable ids when resolving dependency ambiguity.
Sourcepub fn load_for(queue: &Queue, questions: &Questions, task: &Task) -> Self
pub fn load_for(queue: &Queue, questions: &Questions, task: &Task) -> Self
Read only the dependency closure for a detail view. Names across both stores (including tombstones and corrupt records) still establish ambiguity, and unreadable records remain unknown rather than resolved.
Sourcepub fn load_for_tasks(
queue: &Queue,
questions: &Questions,
tasks: &[Task],
) -> Self
pub fn load_for_tasks( queue: &Queue, questions: &Questions, tasks: &[Task], ) -> Self
Share id enumeration and dependency reads across one list page.
Sourcepub fn stuck(&self) -> BTreeMap<String, BTreeSet<String>>
pub fn stuck(&self) -> BTreeMap<String, BTreeSet<String>>
Every stuck blocked task, with the root ids it is frozen behind.
Sourcepub fn stuck_roots(&self, task: &Task) -> BTreeSet<String>
pub fn stuck_roots(&self, task: &Task) -> BTreeSet<String>
The roots task is frozen behind; empty when it is not stuck.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Inventory
impl Freeze for Inventorywhere
*const LeafNode<String, Task> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Task)>>: Freeze,
*const LeafNode<String, DecisionRecord> is !null: Freeze,
PhantomData<Box<(String, DecisionRecord)>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<String>: Freeze,
impl Move for Inventory
impl RefUnwindSafe for Inventory
impl Send for Inventory
impl Sync for Inventory
impl Unpin for Inventory
impl UnsafeUnpin for Inventorywhere
*const LeafNode<String, Task> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Task)>>: UnsafeUnpin,
*const LeafNode<String, DecisionRecord> is !null: UnsafeUnpin,
PhantomData<Box<(String, DecisionRecord)>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for Inventorywhere
BTreeMap<String, Task>: UnwindSafe,
BTreeMap<String, DecisionRecord>: UnwindSafe,
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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