async-trait-ext 0.2.1

a procedural macro for async traits
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mod expand;
mod lint;

pub use expand::*;
pub use lint::*;

use heck::CamelCase;
use quote::format_ident;
use syn::{Ident, ItemTrait, TraitItemMethod};

fn future_type(item: &ItemTrait, method: &TraitItemMethod) -> Ident {
    format_ident!(
        "{}{}",
        item.ident,
        method.sig.ident.to_string().to_camel_case(),
        span = method.sig.ident.span()
    )
}