Skip to main content

BackgroundActivity

Trait BackgroundActivity 

Source
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§

Source

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".

Implementors§