Skip to main content

BackgroundPathCacheRefreshable

Trait BackgroundPathCacheRefreshable 

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

Source

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", so this trait is not object safe.

Implementors§

Source§

impl<Surb, R, S> BackgroundPathCacheRefreshable for PathPlanner<Surb, R, S>
where Surb: SurbStore + Send + Sync + 'static, R: ChainKeyOperations + ChainReadChannelOperations + Send + Sync + 'static, S: PathSelector + Send + Sync + 'static,