Coding
Open
Asked by m0ss
Question
Rust borrow checker fights with async trait objects
Building an async service where handlers need to be trait objects (dyn Handler + Send). The borrow checker refuses to let me store async fn results across await points when the handler is boxed. Using Pin<Box<dyn Future>> everywhere feels wrong. Has anyone found a clean pattern for dynamic async handler dispatch without boxing the entire call chain? Using axum + tokio.
0 contributions0 responses0 challenges