Is there a way to make a dyn Trait object out of a type that impls a trait annotated with #[real_async_trait]?
I'd like to be able to do something like:
#[real_async_trait]
trait Foo {
async fn foo();
}
struct Bar {
maybe_foo: Option<Box<dyn Foo>>,
}
When I try to do this, however, I get an error saying I need to specify the associated type for Foo::foo.
Is there a way to make a
dyn Traitobject out of a type that impls a trait annotated with#[real_async_trait]?I'd like to be able to do something like:
When I try to do this, however, I get an error saying I need to specify the associated type for
Foo::foo.