macro_rules! with_abi {
( $abi:path, $ty:ty ) => { ... };
( $lit:tt, $ty:ty ) => { ... };
}Expand description
Construct a function-pointer type identical to the given one but using the specified abi.
Accepts either:
ยงExamples
type F = with_abi!(abi::Rust, extern "C" fn(i32) -> i32);
// `F` is `fn(i32) -> i32` (equivalent to `extern "Rust" fn(i32) -> i32`)
type G = with_abi!("C", extern "system" fn());
// `G` is `extern "C" fn()`