Suppose I have the following code:
struct Example;
impl Example {
#[my_attr_macro]
fn method() -> Self {
Self;
}
}
I want to generate a function that will eventually call this method in its body. I am able to generate such a function already but it's placed inside the impl block. Is there any way to generate on the outer scope of the impl block?
This outer function will be called from C code so it has use C ABI and it must have a specific name (which I will also generate) to work.