[−][src]Attribute Macro apply_macro::apply
#[apply]
The main attribute macro of this crate.
This accepts paths to the function-like macros you want to call as argument. See also examples in the crate-level documentation.
Limitation
Note that this may be fixed in the future without a major version bump. Do not rely on it.
This macro does not check for invalid arguments:
use apply_macro::apply; macro_rules! derive_debug { ($input:item) => { #[derive(Debug)] $input }; } #[apply(#[derive(Debug)] struct AnotherStruct; derive_debug)] struct ImplsDebug; dbg!(AnotherStruct, ImplsDebug);