generate_function_re_exports!() { /* proc-macro */ }Expand description
Generates re-exports for all public free functions in a directory.
This macro scans the specified directory for Rust files, parses them to find public free functions,
and generates pub use statements for them. It supports aliasing to resolve name conflicts.
§Syntax
ⓘ
generate_function_re_exports!("path/to/directory", {
original_name: aliased_name,
...
})path/to/directory: The path to the directory containing the modules, relative to the crate root.aliases: A map of function names to their desired aliases.
§Generates
pub use statements for each public function found in the directory.
§Examples
ⓘ
// Invocation
generate_function_re_exports!("src/classes", {
identity: category_identity,
new: fn_new,
});
// Expanded code
pub use src::classes::category::identity as category_identity;
pub use src::classes::function::new as fn_new;
// ... other re-exports