pub struct RedbQueue { /* private fields */ }Expand description
The durable/ephemeral redb-backed Queue.
Trait Implementations§
Source§impl Queue for RedbQueue
impl Queue for RedbQueue
Source§fn enqueue<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
query: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn enqueue<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
query: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn claim_pending<'life0, 'async_trait>(
&'life0 self,
n: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingItem>, QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn claim_pending<'life0, 'async_trait>(
&'life0 self,
n: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingItem>, QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Claim up to
n pending items for processing (approximately FIFO). Read moreSource§fn mark_resolved<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
target_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mark_resolved<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
target_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Mark an item resolved and bind its target (attempts unchanged). Read more
Source§fn mark_unresolved<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mark_unresolved<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Mark an item unresolved (content miss); attempts += 1. Read more
Source§fn release<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn release<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Release a claimed item back to pending after a transient failure
(attempts unchanged). Read more
Auto Trait Implementations§
impl !RefUnwindSafe for RedbQueue
impl !UnwindSafe for RedbQueue
impl Freeze for RedbQueue
impl Send for RedbQueue
impl Sync for RedbQueue
impl Unpin for RedbQueue
impl UnsafeUnpin for RedbQueue
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