RustのTrait内にasync fnが定義できないが、#async_traitを使って回避できる
#Rust
以下のcrateでできるらしい。
dtolnay/async-trait: Type erasure for async trait methods
なぜTrait内だとasync fnが定義するのが難しいのかの記事もあった。
why async fn in traits are hard
以下の公式のドキュメントで書かれているようにTrait内でasync fnが定義できない。(将来的には)
Currently, async fn cannot be used in traits. The reasons for this are somewhat complex, but there are plans to remove this restriction in the future.
引用元: async in Traits - Asynchronous Programming in Rust