Skip to content

Add proc macro for converting async traits to return StackFutures #5

@eholk

Description

@eholk

The idea here is to make a macro similar to the #[async_trait] one from the async trait crate. Using it would look something like this:

#[stackfuture::async_trait(4096)]
trait Foo {
    async fn bar(&self) -> i32;
}

The macro would then expand to something like (along with whatever lifetime annotations are needed:

trait Foo {
    fn bar(&self) -> StackFuture<i32, { 4096 }>`;
}

We'd do a similar thing for impls as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions