pub trait BackgroundActivity: Send + Sync {
// Required method
fn show(&self, work: Option<&BackgroundWork>);
}Expand description
Keeps the app running while work is active, and shows that work.
Implementations are Send + Sync (leases change from worker threads).
Required Methods§
Sourcefn show(&self, work: Option<&BackgroundWork>)
fn show(&self, work: Option<&BackgroundWork>)
The work to show, or None once every lease has ended. Called when the
first lease starts, whenever what is shown changes, and when the last
lease ends; implementations must tolerate repeats.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".