use itertools::Itertools;
+/// Generates config resolver method
+///
/// Atrributes:
///
-/// * `limited`, `server`, `client`: cooked sets of settings
+/// * `limited`, `server`, `client`: cooked sets of settings;
+/// default `SKL` is `Ordinary` except for `limited`
/// * `special(method, SKL)`
+///
+/// Generated code
+///
+/// ```no_run
+/// impl<'c> ResolveContext<'c> {
+///
+/// const FIELDS: &'static [(&'static str, SectionKindList)] = &[ ... ];
+///
+/// #[throws(AE)]
+/// fn resolve_instance(&self) -> InstanceConfig {
+/// InstanceConfig {
+/// ...
+/// max_batch_down: self.limited("max_batch_down")?,
+/// ...
+/// }
+/// }
+/// }
+/// ```
#[proc_macro_derive(ResolveConfig, attributes(
limited, server, client, special
))]
}
}
-/*
-impl<'c> ResolveContext<'c> {
- #[throws(AE)]
- fn resolve_instance(&self) -> InstanceConfig {
- InstanceConfig {
- max_batch_down: self.limited::<u32>("max_batch_down")?,
- }
- }
-}
-*/
-
#[throws(AE)]
pub fn read() {
let opts = config::Opts::from_args();