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§
Sourcefn dispatch(self) -> PendingDispatch<Self>where
Self: Sized,
fn dispatch(self) -> PendingDispatch<Self>where
Self: Sized,
Create a pending dispatch for this job.
Sourcefn delay(self, duration: Duration) -> PendingDispatch<Self>where
Self: Sized,
fn delay(self, duration: Duration) -> PendingDispatch<Self>where
Self: Sized,
Dispatch this job with a delay.
Sourcefn on_queue(self, queue: &'static str) -> PendingDispatch<Self>where
Self: Sized,
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.