pub trait JobProducer:
Send
+ Sync
+ 'static {
// Required method
fn push_json<'life0, 'life1, 'async_trait>(
&'life0 self,
queue: &'life1 str,
payload: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Backend-agnostic producer: push a JSON-serialized job onto a named queue.
Concrete backends implement this; typed pushes are a convenience built on
top via JobProducerExt.
Required Methods§
Sourcefn push_json<'life0, 'life1, 'async_trait>(
&'life0 self,
queue: &'life1 str,
payload: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn push_json<'life0, 'life1, 'async_trait>(
&'life0 self,
queue: &'life1 str,
payload: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Push a JSON-encoded job onto queue. The wire format is always JSON;
a backend may re-encode internally but must round-trip the payload.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".