auto-delegate-impl 0.1.2

Auto delegate allows you that automatic impl of traits and delegate their handling to child members.
Documentation
use syn::parse::{Parse, ParseStream};
use syn::Token;

#[derive(Copy, Clone)]
pub struct AsyncTraitArgs {
    pub local: bool,
}

mod kw {
    syn::custom_keyword!(Send);
}

impl Parse for AsyncTraitArgs {
    fn parse(input: ParseStream) -> syn::Result<Self> {
        if input.peek(Token![?]) {
            input.parse::<Token![?]>()?;
            input.parse::<kw::Send>()?;
            Ok(AsyncTraitArgs { local: true })
        } else {
            Ok(AsyncTraitArgs { local: false })
        }
    }
}