Trait Queue
Source pub trait Queue:
Send
+ Sync
+ 'static {
// Required methods
fn push<'life0, 'async_trait>(
&'life0 self,
req: EnqueueRequest,
) -> Pin<Box<dyn Future<Output = Result<JobId>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn pop<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queues: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<Option<RawJob>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn ack<'life0, 'async_trait>(
&'life0 self,
id: JobId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn fail<'life0, 'life1, 'async_trait>(
&'life0 self,
id: JobId,
err: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn retry<'life0, 'async_trait>(
&'life0 self,
id: JobId,
retry_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get<'life0, 'async_trait>(
&'life0 self,
id: JobId,
) -> Pin<Box<dyn Future<Output = Result<Option<RawJob>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue: &'life1 str,
status: Option<&'life2 str>,
limit: usize,
offset: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<RawJob>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn queue_depths<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, u64>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}