Skip to main content

proc_macro_kind

Function proc_macro_kind 

fn proc_macro_kind(attrs: &[Attribute], own: &str) -> Option<(String, Kind)>
Expand description

The macro a #[proc_macro*] function declares, and its kind.

A proc macro is a function in the source and a macro in the documentation, and the two need not share a name: #[proc_macro_derive(Space, attributes(space))] pub fn derive_space declares Space. Reading the attribute is the only way to learn the exported name.