Crate auto_http_derive

source ·

Attribute Macros

  • This macro iterate through all matches directories, when it founds some rs files it looks for function called handle and automatically configure it on axum. The first parameter is the file tree pattern always use it with ‘’ wildcards patterns ex: /src/app//api/.rs The second parameter of this macro is the container struct name, container means to state type that the router are going to receiver example of usage config/mod.rs #[configure_routes(“./src/app//api/*.rs”, crate::Container)] pub fn config_routes(){}