From: Ian Jackson Date: Sat, 7 Aug 2021 21:50:39 +0000 (+0100) Subject: config: get global config, macro doc X-Git-Tag: hippotat/1.0.0~250 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=9dfc54ebabd4cf771579f46109a704d3837eb056;p=hippotat.git config: get global config, macro doc Signed-off-by: Ian Jackson --- diff --git a/macros/macros.rs b/macros/macros.rs index ee79e07..6413499 100644 --- a/macros/macros.rs +++ b/macros/macros.rs @@ -46,8 +46,13 @@ use itertools::Itertools; /// } /// } /// -/// pub struct InstanceConfigCommon { -/// { +/// pub struct InstanceConfigCommon { ... } +/// impl InstanceConfigCommon { +/// pub fn from(l: &[InstanceConfig]) { InstanceConfigCommon { +/// field: ::resolve(l.iter().map(|e| &e.field)), +/// ... +/// } } +/// } /// ``` #[proc_macro_derive(ResolveConfig, attributes( limited, server, client, computed, special,