pub trait BackgroundPathCacheRefreshable: Send + Sync {
// Required method
fn run_background_refresh(
&self,
) -> impl Future<Output = ()> + Send + 'static;
}Expand description
A selector that can run a background path-cache refresh loop.
Implementors pre-warm their internal caches on a periodic schedule, so that steady-state traffic is always served without a blocking query.
The returned future is 'static because it is intended to be
spawned as a long-lived background task.
Required Methods§
Sourcefn run_background_refresh(&self) -> impl Future<Output = ()> + Send + 'static
fn run_background_refresh(&self) -> impl Future<Output = ()> + Send + 'static
Returns a future that runs the periodic cache-refresh loop.
The future never completes under normal operation.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".