Queueable

Trait Queueable 

Source
pub trait Queueable:
    Job
    + Serialize
    + DeserializeOwned {
    // Provided methods
    fn dispatch(self) -> PendingDispatch<Self>
       where Self: Sized { ... }
    fn delay(self, duration: Duration) -> PendingDispatch<Self>
       where Self: Sized { ... }
    fn on_queue(self, queue: &'static str) -> PendingDispatch<Self>
       where Self: Sized { ... }
}
Expand description

Trait for types that can be dispatched to a queue.

Provided Methods§

Source

fn dispatch(self) -> PendingDispatch<Self>
where Self: Sized,

Create a pending dispatch for this job.

Source

fn delay(self, duration: Duration) -> PendingDispatch<Self>
where Self: Sized,

Dispatch this job with a delay.

Source

fn on_queue(self, queue: &'static str) -> PendingDispatch<Self>
where Self: Sized,

Dispatch this job to a specific 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§

Source§

impl<T> Queueable for T

Blanket implementation for all types that implement Job + Serialize + DeserializeOwned.