Macro editor_config

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

macro_rules! editor_config {
(
impl $ty:ty {
$(
$field:ident => {
label: $label:literal,
kind: $kind:ident
$(, values: [$($value:literal),* $(,)?])?
$(, optional: $optional:literal)?
$(, nested: $nested:ty)?
$(, default: $default:ty)?
$(, list: $list:expr)?
$(, tagged_union: $tagged_union:expr)?
$(,)?
}
),* $(,)?
}
) => { ... };
(@kind Boolean) => { ... };
(@kind String) => { ... };
(@kind Integer) => { ... };
(@kind Float) => { ... };
(@kind Enum) => { ... };
(@kind StringMap) => { ... };
(@kind Json) => { ... };
(@kind List) => { ... };
(@kind TaggedUnion) => { ... };
(@kind Section) => { ... };
(@values) => { ... };
(@values $($value:literal),*) => { ... };
(@optional) => { ... };
(@optional $optional:literal) => { ... };
(@nested) => { ... };
(@nested $nested:ty) => { ... };
(@default) => { ... };
(@default $default:ty) => { ... };
(@list) => { ... };
(@list $list:expr) => { ... };
(@tagged_union) => { ... };
(@tagged_union $tagged_union:expr) => { ... };
}

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.