///
/// * `limited`, `server`, `client`: cooked sets of settings;
/// default `SKL` is `PerClient` except for `limited`
+/// * `global` and `per_client`: set the SKL.
/// * `special(method, SKL)`
///
/// Generated code
/// }
/// ```
#[proc_macro_derive(ResolveConfig, attributes(
- limited, server, client, computed, special
+ limited, server, client, computed, special,
+ per_client, global,
))]
pub fn resolve(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let input = parse_macro_input!(input as DeriveInput);
for attr in &field.attrs {
let atspan = attr.path.segments.last().unwrap().ident.span();
if attr.tokens.is_empty() {
+ if &attr.path == &parse_quote!{ per_client } {
+ skl = Some(quote_spanned!{fname_span=> SectionKindList::PerClient });
+ continue;
+ } else if &attr.path == &parse_quote!{ global } {
+ skl = Some(quote_spanned!{fname_span=>
+ SectionKindList::Global });
+ continue;
+ }
method = attr.path.to_token_stream();
if &attr.path == &parse_quote!{ limited } {
skl = Some(quote_spanned!{atspan=> SectionKindList::Limited });