Derive macro to implementing `cli_table` traits
(input: TokenStream)
| 15 | #[proc_macro_derive(Table, attributes(table))] |
| 16 | /// Derive macro to implementing `cli_table` traits |
| 17 | pub fn table(input: TokenStream) -> TokenStream { |
| 18 | // Parse the input tokens into a syntax tree |
| 19 | let input = parse_macro_input!(input as DeriveInput); |
| 20 | |
| 21 | // Prepare and return the output |
| 22 | table::table(input) |
| 23 | .unwrap_or_else(|err| err.to_compile_error()) |
| 24 | .into() |
| 25 | } |
nothing calls this directly
no outgoing calls
no test coverage detected