Rust Async Traits Still Aren't Object-Safe: The Real Fixes
Async fn in traits still isn't dyn-compatible in Rust. Here are the three real workarounds (enum dispatch, async-trait, RPITIT) and when to use each one.
14 min readZeeshan Tofiq
1 article
Rust coverage centred on the type system questions that block real designs. The current article explains async traits and object safety, why an async trait method prevents a trait from being used as a trait object, and the concrete workarounds available including boxed futures and the trade-offs each one carries in allocation and ergonomics. Code samples compile as written.