pub type CleanupFn = Box<dyn FnOnce() -> Pin<Box<dyn Future<Output = ()> + Send>> + Send>;Expand description
Type alias for cleanup functions.
A cleanup function is an async closure that performs teardown work after
the request handler completes. Cleanup functions run in LIFO (last-in,
first-out) order, similar to Python’s contextlib.ExitStack.
Aliased Type§
pub struct CleanupFn(/* private fields */);