pub struct MemoryQueue { /* private fields */ }Implementations§
Source§impl MemoryQueue
impl MemoryQueue
Trait Implementations§
Source§impl Debug for MemoryQueue
impl Debug for MemoryQueue
Source§impl Default for MemoryQueue
impl Default for MemoryQueue
Source§fn default() -> MemoryQueue
fn default() -> MemoryQueue
Returns the “default value” for a type. Read more
Source§impl QueueBackend for MemoryQueue
impl QueueBackend for MemoryQueue
Source§fn enqueue<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
job_type: &'life2 str,
payload: Value,
delay_secs: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Uuid, 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,
tenant_id: &'life1 str,
job_type: &'life2 str,
payload: Value,
delay_secs: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Uuid, QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Enqueue a job payload for a specific tenant
Source§fn dequeue<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<JobEntry>, QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dequeue<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<JobEntry>, QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Pull next available job
Source§fn update_status<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
status: JobStatus,
error: Option<String>,
delay_secs: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_status<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
status: JobStatus,
error: Option<String>,
delay_secs: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<(), QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update job status (ack/nack)
delay_secs is used for retries - how long to wait before the job is available againSource§fn get_status<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<JobStatus, QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_status<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<JobStatus, QueueError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get job status
Auto Trait Implementations§
impl Freeze for MemoryQueue
impl !RefUnwindSafe for MemoryQueue
impl Send for MemoryQueue
impl Sync for MemoryQueue
impl Unpin for MemoryQueue
impl UnsafeUnpin for MemoryQueue
impl !UnwindSafe for MemoryQueue
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