Macro link
macro_rules! link {
($library:literal $abi:literal $($link_name:literal)? fn $name:ident($($params:tt)*) $(-> $ret:ty)?) => { ... };
}Expand description
Defines an external function to import.
Expands to an extern block declaring the function as well as a pub type
alias matching the function’s signature. The type alias has the same name
as the function, lives in the type namespace, and is useful for storing or
passing around the function pointer (for example, after resolving the
symbol at runtime via GetProcAddress).