pub struct Queue {
pub path: PathBuf,
}Fields§
§path: PathBufImplementations§
Source§impl Queue
impl Queue
pub fn new(path: PathBuf) -> Self
Sourcepub fn push(
&self,
sources: Vec<Source>,
title: Option<String>,
description: Option<String>,
priority: Option<u8>,
metadata: Value,
blocked_by: Vec<String>,
) -> Result<Item>
pub fn push( &self, sources: Vec<Source>, title: Option<String>, description: Option<String>, priority: Option<u8>, metadata: Value, blocked_by: Vec<String>, ) -> Result<Item>
Add a new item to the queue. Returns the created Item.
Sourcepub fn push_many_with_description(
&self,
items: Vec<NewItem>,
) -> Result<Vec<Item>>
pub fn push_many_with_description( &self, items: Vec<NewItem>, ) -> Result<Vec<Item>>
Add many new items to the queue under a single lock.
Sourcepub fn open_ids(&self) -> HashSet<String>
pub fn open_ids(&self) -> HashSet<String>
Return IDs for all non-closed items currently in the queue.
Sourcepub fn item_with_computed_status(&self, item: Item) -> Item
pub fn item_with_computed_status(&self, item: Item) -> Item
Apply computed/display status semantics to a single item.
Sourcepub fn items_with_computed_status(&self, items: Vec<Item>) -> Vec<Item>
pub fn items_with_computed_status(&self, items: Vec<Item>) -> Vec<Item>
Apply computed/display status semantics to a collection of items.
Sourcepub fn all_with_computed_status(&self) -> Vec<Item>
pub fn all_with_computed_status(&self) -> Vec<Item>
Load all items and apply computed/display status semantics.
Sourcepub fn find_with_computed_status(&self, id: &str) -> Option<Item>
pub fn find_with_computed_status(&self, id: &str) -> Option<Item>
Find an item by ID and apply computed/display status semantics.
Sourcepub fn filter(&self, status: Option<&str>) -> Vec<Item>
pub fn filter(&self, status: Option<&str>) -> Vec<Item>
Filter items by persisted lifecycle status (optional).
This method intentionally does not apply computed/display status
semantics. Callers that want view-oriented filtering (for example,
treating blocked as a visible status in list/show output) should load
items, call with_computed_status(...), and then filter those results.
Sourcepub fn ready(&self) -> Vec<Item>
pub fn ready(&self) -> Vec<Item>
Return pending items that are not blocked by any non-closed item.