macro_rules! generate_http_response_functions {
($($enum:ty),*) => { ... };
}Expand description
This Rust code defines a macro generate_http_response_functions that generates response functions for enums implementing the ResponseFunctions trait. Here’s a breakdown of what the macro does:
- The macro takes a list of enum types as arguments.
- For each enum type, the macro generates functions for each variant of the enum.
- The generated functions return a tuple containing the HTTP status code and the description of the response.
- The generated functions are named based on the snake_case, camelCase, and PascalCase versions of the variant name.