chiark
/
gitweb
/
~ian
/
hippotat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c48a8ad
)
config: get global config, macro doc
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 7 Aug 2021 21:50:39 +0000
(22:50 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 7 Aug 2021 21:50:39 +0000
(22:50 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
macros/macros.rs
patch
|
blob
|
history
diff --git
a/macros/macros.rs
b/macros/macros.rs
index ee79e075ef7d71ba64508f1625538d8efac4a538..6413499a2df45b5471d6f70b7bed756f533c665c 100644
(file)
--- 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: <Type as ResolveGlobal>::resolve(l.iter().map(|e| &e.field)),
+/// ...
+/// } }
+/// }
/// ```
#[proc_macro_derive(ResolveConfig, attributes(
limited, server, client, computed, special,