macro_rules! declare_annotations {
( $( $(#[$attr:meta])* $name:ident = $val:expr ;)+ ) => { ... };
}Expand description
Declares a set of SalukiAnnotation constants and generates a companion ALL slice.
Each entry declares one named pub const annotation. The macro also emits:
ⓘ
pub const ALL: &[&SalukiAnnotation] = &[&NAME1, &NAME2, ...];so that datadog/mod.rs can aggregate submodules with a single
v.extend_from_slice(my_module::ALL) line rather than listing every constant by name.
§Example
ⓘ
declare_annotations! {
/// Doc comment for PROXY_HTTP.
PROXY_HTTP = SalukiAnnotation { ... };
PROXY_HTTPS = SalukiAnnotation { ... };
}