Skip to main content

Module offload

Module offload 

Source
Expand description

Offload trait for background task execution.

This module provides the Offload trait which abstracts over different implementations for spawning background tasks.

§Lifetime Parameter

The Offload<'a> trait is parameterized by a lifetime to support both:

  • 'static futures (for real background execution with OffloadManager)
  • Non-'static futures (for middleware integration with DisabledOffload)

This design allows CacheFuture to work with borrowed upstreams (like reqwest middleware’s Next<'_>) when background revalidation is not needed.

Structs§

DisabledOffload
A disabled offload implementation that discards all spawned tasks.

Traits§

Offload
Trait for spawning background tasks.