Closed jdonszelmann closed 4 years ago
for example:
create_annotatation!(fn test() -> (););
#[test::annotate]
fn my_fn() {
println!("Test!");
}
fn main() {
println!("calling all 'test' label");
// using iter you can go through all functions with this annotation.
for name, i in test::iter_named() {
assert_eq!(name, "my_fn");
}
}
It should be possible to query the name of the function, while you are iterating over it. This will mean that the functions will need to be stored in a hashmap.