Skip to content

dyn real_async_trait? #6

@eholk

Description

@eholk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions