Skip to main content

boxit

Function boxit 

Source
pub fn boxit<'a, T>(
    fut: impl Future<Output = T> + Send + 'a,
) -> Pin<Box<dyn Future<Output = T> + Send + 'a>>
Expand description

Type erase the provided future by boxing it.

THis can potentially help with compilation time and future size bloat by factoring out pieces of larger futures into opaque chunks.