# Implement dyn dispatch for RPITIT
[impl-trait-utils#34](https://github.com/rust-lang/impl-trait-utils/issues/34)
The core goal is to make async fn in trait and other RPITIT usable with dynamic dispatch via a proc macro, in a way similar to how it works with `async_trait`, but while continuing to allow static dispatch.
To start, something that just boxes your return type would be good
something like this https://rust-lang.github.io/async-fundamentals-initiative/explainer/async_fn_in_dyn_trait/hardcoding_box.html
Eventually we could try making adapters that allow stack allocation as in https://rust-lang.github.io/async-fundamentals-initiative/explainer/async_fn_in_dyn_trait/avoiding_allocation.html and https://rust-lang.github.io/async-fundamentals-initiative/explainer/async_fn_in_dyn_trait/generalizing_from_box_to_dynx.html
Even just having something that lets you use async fn in a trait returning `Box<dyn Future>` would make it so people no longer have to use the [`async_trait`](https://github.com/dtolnay/async-trait) crate.
https://github.com/rust-lang/impl-trait-utils/tree/main/trait-variant
## What do we want?
```rust
trait AsyncIter {
type Item;
async fn next(&mut self) -> Option<Self::Item>;
}
```