Skip to main content

BackgroundTaskHandler

Trait BackgroundTaskHandler 

Source
pub trait BackgroundTaskHandler: Send + Sync {
    // Required method
    fn handle(&self, completion: BackgroundTaskCompletion) -> AuthResult<()>;
}
Expand description

Application integration for deferred operations, such as platform waitUntil.

The callback receives a completion rather than a task that it must start. A synchronous callback error does not cancel work already started.

Required Methods§

Source

fn handle(&self, completion: BackgroundTaskCompletion) -> AuthResult<()>

§Errors

Returns an error if the application rejects observation of the background completion.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§