Skip to main content

Callback

Trait Callback 

Source
pub trait Callback: Queueable {
    const NAME: &'static str;
    const FAIL_WHEN_MISSING_MODELS: bool = false;
}
Expand description

A Queueable struct with then, catch, or finally methods that a batch or chain calls directly, without queueing them, when it reaches each method’s point.

Implement this trait with #[callback] on the struct’s impl block. The batch or chain stores the struct’s fields until the callback runs, and the worker reads the callback’s models again before calling it.

Required Associated Constants§

Source

const NAME: &'static str

The name that the batch or chain stores the callback under and finds it by.

Provided Associated Constants§

Source

const FAIL_WHEN_MISSING_MODELS: bool = false

Whether the callback reports a MissingModels error, rather than being skipped, when the row of one of its models is gone.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§