pub trait JobQueueExt: JobQueue {
// Provided methods
fn push_typed<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
queue_name: &'life1 str,
payload: &'life2 T,
priority: Priority,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where T: 'async_trait + Serialize + Send + Sync,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn push_typed_with_options<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
queue_name: &'life1 str,
payload: &'life2 T,
priority: Priority,
delay_seconds: i32,
max_attempts: i32,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where T: 'async_trait + Serialize + Send + Sync,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn pop_typed<'life0, 'life1, 'async_trait, T>(
&'life0 self,
queue_name: &'life1 str,
lock_duration_seconds: i32,
) -> Pin<Box<dyn Future<Output = Result<Option<TypedJob<T>>>> + Send + 'async_trait>>
where T: 'async_trait + DeserializeOwned,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Typed convenience methods for JobQueue.
Provided Methods§
Sourcefn push_typed<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
queue_name: &'life1 str,
payload: &'life2 T,
priority: Priority,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
fn push_typed<'life0, 'life1, 'life2, 'async_trait, T>( &'life0 self, queue_name: &'life1 str, payload: &'life2 T, priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
Push a typed payload to the queue. Returns the generated job ID.
Sourcefn push_typed_with_options<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
queue_name: &'life1 str,
payload: &'life2 T,
priority: Priority,
delay_seconds: i32,
max_attempts: i32,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
fn push_typed_with_options<'life0, 'life1, 'life2, 'async_trait, T>( &'life0 self, queue_name: &'life1 str, payload: &'life2 T, priority: Priority, delay_seconds: i32, max_attempts: i32, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
Push a typed payload with full options.
Sourcefn pop_typed<'life0, 'life1, 'async_trait, T>(
&'life0 self,
queue_name: &'life1 str,
lock_duration_seconds: i32,
) -> Pin<Box<dyn Future<Output = Result<Option<TypedJob<T>>>> + Send + 'async_trait>>where
T: 'async_trait + DeserializeOwned,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pop_typed<'life0, 'life1, 'async_trait, T>(
&'life0 self,
queue_name: &'life1 str,
lock_duration_seconds: i32,
) -> Pin<Box<dyn Future<Output = Result<Option<TypedJob<T>>>> + Send + 'async_trait>>where
T: 'async_trait + DeserializeOwned,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Pop and deserialize a typed job from the queue.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<T: JobQueue + ?Sized> JobQueueExt for T
Blanket impl: any JobQueue automatically gets JobQueueExt.