pub trait BuildFn<Safety = Safe, Abi = Rust, Output = ()>: Tuple {
type F: FnPtr<Args = Self, Output = Output, Safety = Safety, Abi = Abi>;
}Expand description
Constructs a function-pointer type from its components.
Given
The trait is implemented for tuples, which get turned into the parameter types of F.
§Examples
use fn_ptr::{BuildFn, safety, abi};
type F0 = <(i32,) as BuildFn>::F; // fn(i32)
type F1 = <() as BuildFn<safety::Unsafe, abi::Rust, u64>>::F; // unsafe fn() -> u64
type F2 = <(String, f32) as BuildFn<safety::Safe, abi::C, i32>>::F; // extern "C" fn(String, f32) -> i32