pub trait ProviderOnApplicationShutdown:
Send
+ Sync
+ 'static {
// Provided methods
fn on_application_shutdown(
&self,
_module_ref: ModuleRef,
) -> BoxFuture<'static, Result<()>> { ... }
fn on_application_shutdown_with_signal(
&self,
module_ref: ModuleRef,
_signal: Option<String>,
) -> BoxFuture<'static, Result<()>> { ... }
}Expand description
Lifecycle hook for singleton providers that need async shutdown cleanup.
Provided Methods§
fn on_application_shutdown( &self, _module_ref: ModuleRef, ) -> BoxFuture<'static, Result<()>>
fn on_application_shutdown_with_signal( &self, module_ref: ModuleRef, _signal: Option<String>, ) -> BoxFuture<'static, Result<()>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".