Macro editor_config

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.

1macro_rules! editor_config {
2 (
3 impl $ty:ty {
4 $(
5 $field:ident => {
6 label: $label:literal,
7 kind: $kind:ident
8 $(, values: [$($value:literal),* $(,)?])?
9 $(, optional: $optional:literal)?
10 $(, nested: $nested:ty)?
11 $(, default: $default:ty)?
12 $(,)?
13 }
14 ),* $(,)?
15 }
16 ) => { ... };
17 (@kind Boolean) => { ... };
18 (@kind String) => { ... };
19 (@kind Integer) => { ... };
20 (@kind Float) => { ... };
21 (@kind Enum) => { ... };
22 (@kind StringMap) => { ... };
23 (@kind Json) => { ... };
24 (@kind Section) => { ... };
25 (@values) => { ... };
26 (@values $($value:literal),*) => { ... };
27 (@optional) => { ... };
28 (@optional $optional:literal) => { ... };
29 (@nested) => { ... };
30 (@nested $nested:ty) => { ... };
31 (@default) => { ... };
32 (@default $default:ty) => { ... };
33}

Implements EditorConfig for a configuration type.

This macro intentionally keeps editor metadata next to the Rust config type while avoiding proc-macro reflection. Field order is declaration order inside the macro invocation.