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>,
metadata: Value,
session_id: Option<String>,
blocked_by: Vec<String>,
) -> Result<Item>
pub fn push( &self, sources: Vec<Source>, title: Option<String>, metadata: Value, session_id: Option<String>, blocked_by: Vec<String>, ) -> Result<Item>
Add a new item to the queue. Returns the created Item.
Sourcepub fn push_with_description(
&self,
sources: Vec<Source>,
title: Option<String>,
description: Option<String>,
metadata: Value,
session_id: Option<String>,
blocked_by: Vec<String>,
) -> Result<Item>
pub fn push_with_description( &self, sources: Vec<Source>, title: Option<String>, description: Option<String>, metadata: Value, session_id: Option<String>, blocked_by: Vec<String>, ) -> Result<Item>
Add a new item to the queue with description support.
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 ready(&self) -> Vec<Item>
pub fn ready(&self) -> Vec<Item>
Return pending items that are not blocked by any pending item.
Auto Trait Implementations§
impl Freeze for Queue
impl RefUnwindSafe for Queue
impl Send for Queue
impl Sync for Queue
impl Unpin for Queue
impl UnsafeUnpin for Queue
impl UnwindSafe for Queue
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