pub trait Queueable:
Sized
+ Send
+ Sync
+ 'static { }Expand description
A job, a queued listener’s event, or a callback that the queue can store until a worker runs it.
Derive this trait with #[derive(Queueable)]. When a field’s type is a
model, an Option of a model, or a Vec of models, the queue stores the models’ keys, and the
worker reads the rows again before the job runs. The queue stores every other field as JSON,
so the field’s type must implement Serialize and Deserialize.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<L> Queueable for Queued<L>where
L: QueuedListener,
impl<M> Queueable for Created<M>where
M: Model,
Stored as {"model": 42}, and restored by reading the row again.
impl<M> Queueable for Deleted<M>where
M: Model + __RowIsGone,
impl<M> Queueable for Updated<M>where
M: Model,
Stored as {"model": 42, "changes": ["email", "updated_at"]}, with the names of the changed
columns but not their values. The worker reads the row again.