fn_type_alias
A proc attribute macro that generates a type alias with the given identifier for the attributed function.
```rust
extern crate fntypealias;
pub(super) fn hello_world() { println!("hello world!"); }
pub fn hello_world() { println!("hello world!"); } ```
This macro is well suited for conditional compilation. For example, using the fn_abi
macro:
```rust
extern crate fntypealias;
extern crate fn_abi;
linux32 = "C",
linux64 = "C",
win32 = "thiscall",
win64 = "stdcall"
)]
pub extern fn hello_world() { println!("hello world!"); }
// Expands to when building for Windows 64-bit: pub type HelloWorldFn = extern "stdcall" fn(); pub extern "stdcall" fn hello_world() { println!("hello world!"); } ```