4 ms·
Depends on the (not-yet-implemented) implementation of async functions in traits. But currently, with the async_trait macro, there is only one version of Foo::f
by ogoffart 7y ago
Depends on the (not-yet-implemented) implementation of async functions in traits. But currently, with the async_trait macro, there is only one version of Foo::foo, and it returns a Box<...>.
But it is true we could imagine the compiler generating two versions: one for when the static type is known, and one if dynamic dispatch is used.