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.