pub trait QueueExt: Queue {
// Provided methods
fn dispatch<'a, J: Job>(
&'a self,
job: &'a J,
) -> BoxFuture<'a, Result<String>> { ... }
fn dispatch_on<'a, J: Job>(
&'a self,
queue: &'a str,
job: &'a J,
) -> BoxFuture<'a, Result<String>> { ... }
fn dispatch_later<'a, J: Job>(
&'a self,
delay: Duration,
job: &'a J,
) -> BoxFuture<'a, Result<String>> { ... }
}Expand description
The conveniences that take a concrete job type, and so cannot live on a
dyn-compatible trait. Blanket-implemented, including for dyn Queue.
Provided Methods§
Sourcefn dispatch<'a, J: Job>(&'a self, job: &'a J) -> BoxFuture<'a, Result<String>>
fn dispatch<'a, J: Job>(&'a self, job: &'a J) -> BoxFuture<'a, Result<String>>
dispatch(SendWelcomeEmail { user_id }) — the everyday call.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".