pub trait WorkQueue: Send + Sync {
// Required methods
fn claim_due<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
spec_ids: &'life1 [String],
worker_id: &'life2 str,
lease_secs: i64,
batch: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkItem>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn renew<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
worker_id: &'life2 str,
lease_version: i64,
lease_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn release<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
lease_version: i64,
delay_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn reschedule<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
lease_version: i64,
at: DateTime<Utc>,
config: Value,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
lease_version: i64,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn mark_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
lease_version: i64,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Required Methods§
fn claim_due<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
spec_ids: &'life1 [String],
worker_id: &'life2 str,
lease_secs: i64,
batch: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkItem>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn renew<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
worker_id: &'life2 str,
lease_version: i64,
lease_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn release<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
lease_version: i64,
delay_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn reschedule<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
lease_version: i64,
at: DateTime<Utc>,
config: Value,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
lease_version: i64,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mark_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
lease_version: i64,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".