BuildFn

Trait BuildFn 

Source
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

  • a tuple of argument types (Self)
  • a safety marker (Safety)
  • an abi (Abi)
  • an output type (Output)

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

Required Associated Types§

Source

type F: FnPtr<Args = Self, Output = Output, Safety = Safety, Abi = Abi>

The resulting function-pointer type.

Implementations on Foreign Types§

Source§

impl<Output> BuildFn<Safe, C, Output> for ()

Source§

type F = extern "C" fn() -> Output

Source§

impl<Output> BuildFn<Safe, CUnwind, Output> for ()

Source§

type F = extern "C-unwind" fn() -> Output

Source§

impl<Output> BuildFn<Safe, EfiApi, Output> for ()

Source§

type F = extern "efiapi" fn() -> Output

Source§

impl<Output> BuildFn<Safe, Rust, Output> for ()

Source§

type F = fn() -> Output

Source§

impl<Output> BuildFn<Safe, SysV64, Output> for ()

Source§

type F = extern "sysv64" fn() -> Output

Source§

impl<Output> BuildFn<Safe, SysV64Unwind, Output> for ()

Source§

type F = extern "sysv64-unwind" fn() -> Output

Source§

impl<Output> BuildFn<Safe, System, Output> for ()

Source§

type F = extern "system" fn() -> Output

Source§

impl<Output> BuildFn<Safe, SystemUnwind, Output> for ()

Source§

type F = extern "system-unwind" fn() -> Output

Source§

impl<Output> BuildFn<Unsafe, C, Output> for ()

Source§

type F = unsafe extern "C" fn() -> Output

Source§

impl<Output> BuildFn<Unsafe, CUnwind, Output> for ()

Source§

type F = unsafe extern "C-unwind" fn() -> Output

Source§

impl<Output> BuildFn<Unsafe, EfiApi, Output> for ()

Source§

type F = unsafe extern "efiapi" fn() -> Output

Source§

impl<Output> BuildFn<Unsafe, Rust, Output> for ()

Source§

type F = unsafe fn() -> Output

Source§

impl<Output> BuildFn<Unsafe, SysV64, Output> for ()

Source§

type F = unsafe extern "sysv64" fn() -> Output

Source§

impl<Output> BuildFn<Unsafe, SysV64Unwind, Output> for ()

Source§

type F = unsafe extern "sysv64-unwind" fn() -> Output

Source§

impl<Output> BuildFn<Unsafe, System, Output> for ()

Source§

type F = unsafe extern "system" fn() -> Output

Source§

impl<Output> BuildFn<Unsafe, SystemUnwind, Output> for ()

Source§

type F = unsafe extern "system-unwind" fn() -> Output

Source§

impl<Output, A> BuildFn<Safe, C, Output> for (A,)

Source§

type F = extern "C" fn(A) -> Output

Source§

impl<Output, A> BuildFn<Safe, CUnwind, Output> for (A,)

Source§

type F = extern "C-unwind" fn(A) -> Output

Source§

impl<Output, A> BuildFn<Safe, EfiApi, Output> for (A,)

Source§

type F = extern "efiapi" fn(A) -> Output

Source§

impl<Output, A> BuildFn<Safe, Rust, Output> for (A,)

Source§

type F = fn(A) -> Output

Source§

impl<Output, A> BuildFn<Safe, SysV64, Output> for (A,)

Source§

type F = extern "sysv64" fn(A) -> Output

Source§

impl<Output, A> BuildFn<Safe, SysV64Unwind, Output> for (A,)

Source§

type F = extern "sysv64-unwind" fn(A) -> Output

Source§

impl<Output, A> BuildFn<Safe, System, Output> for (A,)

Source§

type F = extern "system" fn(A) -> Output

Source§

impl<Output, A> BuildFn<Safe, SystemUnwind, Output> for (A,)

Source§

type F = extern "system-unwind" fn(A) -> Output

Source§

impl<Output, A> BuildFn<Unsafe, C, Output> for (A,)

Source§

type F = unsafe extern "C" fn(A) -> Output

Source§

impl<Output, A> BuildFn<Unsafe, CUnwind, Output> for (A,)

Source§

type F = unsafe extern "C-unwind" fn(A) -> Output

Source§

impl<Output, A> BuildFn<Unsafe, EfiApi, Output> for (A,)

Source§

type F = unsafe extern "efiapi" fn(A) -> Output

Source§

impl<Output, A> BuildFn<Unsafe, Rust, Output> for (A,)

Source§

type F = unsafe fn(A) -> Output

Source§

impl<Output, A> BuildFn<Unsafe, SysV64, Output> for (A,)

Source§

type F = unsafe extern "sysv64" fn(A) -> Output

Source§

impl<Output, A> BuildFn<Unsafe, SysV64Unwind, Output> for (A,)

Source§

type F = unsafe extern "sysv64-unwind" fn(A) -> Output

Source§

impl<Output, A> BuildFn<Unsafe, System, Output> for (A,)

Source§

type F = unsafe extern "system" fn(A) -> Output

Source§

impl<Output, A> BuildFn<Unsafe, SystemUnwind, Output> for (A,)

Source§

type F = unsafe extern "system-unwind" fn(A) -> Output

Source§

impl<Output, A, B> BuildFn<Safe, C, Output> for (A, B)

Source§

type F = extern "C" fn(A, B) -> Output

Source§

impl<Output, A, B> BuildFn<Safe, CUnwind, Output> for (A, B)

Source§

type F = extern "C-unwind" fn(A, B) -> Output

Source§

impl<Output, A, B> BuildFn<Safe, EfiApi, Output> for (A, B)

Source§

type F = extern "efiapi" fn(A, B) -> Output

Source§

impl<Output, A, B> BuildFn<Safe, Rust, Output> for (A, B)

Source§

type F = fn(A, B) -> Output

Source§

impl<Output, A, B> BuildFn<Safe, SysV64, Output> for (A, B)

Source§

type F = extern "sysv64" fn(A, B) -> Output

Source§

impl<Output, A, B> BuildFn<Safe, SysV64Unwind, Output> for (A, B)

Source§

type F = extern "sysv64-unwind" fn(A, B) -> Output

Source§

impl<Output, A, B> BuildFn<Safe, System, Output> for (A, B)

Source§

type F = extern "system" fn(A, B) -> Output

Source§

impl<Output, A, B> BuildFn<Safe, SystemUnwind, Output> for (A, B)

Source§

type F = extern "system-unwind" fn(A, B) -> Output

Source§

impl<Output, A, B> BuildFn<Unsafe, C, Output> for (A, B)

Source§

type F = unsafe extern "C" fn(A, B) -> Output

Source§

impl<Output, A, B> BuildFn<Unsafe, CUnwind, Output> for (A, B)

Source§

type F = unsafe extern "C-unwind" fn(A, B) -> Output

Source§

impl<Output, A, B> BuildFn<Unsafe, EfiApi, Output> for (A, B)

Source§

type F = unsafe extern "efiapi" fn(A, B) -> Output

Source§

impl<Output, A, B> BuildFn<Unsafe, Rust, Output> for (A, B)

Source§

type F = unsafe fn(A, B) -> Output

Source§

impl<Output, A, B> BuildFn<Unsafe, SysV64, Output> for (A, B)

Source§

type F = unsafe extern "sysv64" fn(A, B) -> Output

Source§

impl<Output, A, B> BuildFn<Unsafe, SysV64Unwind, Output> for (A, B)

Source§

type F = unsafe extern "sysv64-unwind" fn(A, B) -> Output

Source§

impl<Output, A, B> BuildFn<Unsafe, System, Output> for (A, B)

Source§

type F = unsafe extern "system" fn(A, B) -> Output

Source§

impl<Output, A, B> BuildFn<Unsafe, SystemUnwind, Output> for (A, B)

Source§

type F = unsafe extern "system-unwind" fn(A, B) -> Output

Source§

impl<Output, A, B, C> BuildFn<Safe, C, Output> for (A, B, C)

Source§

type F = extern "C" fn(A, B, C) -> Output

Source§

impl<Output, A, B, C> BuildFn<Safe, CUnwind, Output> for (A, B, C)

Source§

type F = extern "C-unwind" fn(A, B, C) -> Output

Source§

impl<Output, A, B, C> BuildFn<Safe, EfiApi, Output> for (A, B, C)

Source§

type F = extern "efiapi" fn(A, B, C) -> Output

Source§

impl<Output, A, B, C> BuildFn<Safe, Rust, Output> for (A, B, C)

Source§

type F = fn(A, B, C) -> Output

Source§

impl<Output, A, B, C> BuildFn<Safe, SysV64, Output> for (A, B, C)

Source§

type F = extern "sysv64" fn(A, B, C) -> Output

Source§

impl<Output, A, B, C> BuildFn<Safe, SysV64Unwind, Output> for (A, B, C)

Source§

type F = extern "sysv64-unwind" fn(A, B, C) -> Output

Source§

impl<Output, A, B, C> BuildFn<Safe, System, Output> for (A, B, C)

Source§

type F = extern "system" fn(A, B, C) -> Output

Source§

impl<Output, A, B, C> BuildFn<Safe, SystemUnwind, Output> for (A, B, C)

Source§

type F = extern "system-unwind" fn(A, B, C) -> Output

Source§

impl<Output, A, B, C> BuildFn<Unsafe, C, Output> for (A, B, C)

Source§

type F = unsafe extern "C" fn(A, B, C) -> Output

Source§

impl<Output, A, B, C> BuildFn<Unsafe, CUnwind, Output> for (A, B, C)

Source§

type F = unsafe extern "C-unwind" fn(A, B, C) -> Output

Source§

impl<Output, A, B, C> BuildFn<Unsafe, EfiApi, Output> for (A, B, C)

Source§

type F = unsafe extern "efiapi" fn(A, B, C) -> Output

Source§

impl<Output, A, B, C> BuildFn<Unsafe, Rust, Output> for (A, B, C)

Source§

type F = unsafe fn(A, B, C) -> Output

Source§

impl<Output, A, B, C> BuildFn<Unsafe, SysV64, Output> for (A, B, C)

Source§

type F = unsafe extern "sysv64" fn(A, B, C) -> Output

Source§

impl<Output, A, B, C> BuildFn<Unsafe, SysV64Unwind, Output> for (A, B, C)

Source§

type F = unsafe extern "sysv64-unwind" fn(A, B, C) -> Output

Source§

impl<Output, A, B, C> BuildFn<Unsafe, System, Output> for (A, B, C)

Source§

type F = unsafe extern "system" fn(A, B, C) -> Output

Source§

impl<Output, A, B, C> BuildFn<Unsafe, SystemUnwind, Output> for (A, B, C)

Source§

type F = unsafe extern "system-unwind" fn(A, B, C) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Safe, C, Output> for (A, B, C, D)

Source§

type F = extern "C" fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Safe, CUnwind, Output> for (A, B, C, D)

Source§

type F = extern "C-unwind" fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Safe, EfiApi, Output> for (A, B, C, D)

Source§

type F = extern "efiapi" fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Safe, Rust, Output> for (A, B, C, D)

Source§

type F = fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Safe, SysV64, Output> for (A, B, C, D)

Source§

type F = extern "sysv64" fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Safe, SysV64Unwind, Output> for (A, B, C, D)

Source§

type F = extern "sysv64-unwind" fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Safe, System, Output> for (A, B, C, D)

Source§

type F = extern "system" fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Safe, SystemUnwind, Output> for (A, B, C, D)

Source§

type F = extern "system-unwind" fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Unsafe, C, Output> for (A, B, C, D)

Source§

type F = unsafe extern "C" fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Unsafe, CUnwind, Output> for (A, B, C, D)

Source§

type F = unsafe extern "C-unwind" fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Unsafe, EfiApi, Output> for (A, B, C, D)

Source§

type F = unsafe extern "efiapi" fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Unsafe, Rust, Output> for (A, B, C, D)

Source§

type F = unsafe fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Unsafe, SysV64, Output> for (A, B, C, D)

Source§

type F = unsafe extern "sysv64" fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Unsafe, SysV64Unwind, Output> for (A, B, C, D)

Source§

type F = unsafe extern "sysv64-unwind" fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Unsafe, System, Output> for (A, B, C, D)

Source§

type F = unsafe extern "system" fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D> BuildFn<Unsafe, SystemUnwind, Output> for (A, B, C, D)

Source§

type F = unsafe extern "system-unwind" fn(A, B, C, D) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Safe, C, Output> for (A, B, C, D, E)

Source§

type F = extern "C" fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Safe, CUnwind, Output> for (A, B, C, D, E)

Source§

type F = extern "C-unwind" fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Safe, EfiApi, Output> for (A, B, C, D, E)

Source§

type F = extern "efiapi" fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Safe, Rust, Output> for (A, B, C, D, E)

Source§

type F = fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Safe, SysV64, Output> for (A, B, C, D, E)

Source§

type F = extern "sysv64" fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Safe, SysV64Unwind, Output> for (A, B, C, D, E)

Source§

type F = extern "sysv64-unwind" fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Safe, System, Output> for (A, B, C, D, E)

Source§

type F = extern "system" fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Safe, SystemUnwind, Output> for (A, B, C, D, E)

Source§

type F = extern "system-unwind" fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Unsafe, C, Output> for (A, B, C, D, E)

Source§

type F = unsafe extern "C" fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Unsafe, CUnwind, Output> for (A, B, C, D, E)

Source§

type F = unsafe extern "C-unwind" fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Unsafe, EfiApi, Output> for (A, B, C, D, E)

Source§

type F = unsafe extern "efiapi" fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Unsafe, Rust, Output> for (A, B, C, D, E)

Source§

type F = unsafe fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Unsafe, SysV64, Output> for (A, B, C, D, E)

Source§

type F = unsafe extern "sysv64" fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Unsafe, SysV64Unwind, Output> for (A, B, C, D, E)

Source§

type F = unsafe extern "sysv64-unwind" fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Unsafe, System, Output> for (A, B, C, D, E)

Source§

type F = unsafe extern "system" fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E> BuildFn<Unsafe, SystemUnwind, Output> for (A, B, C, D, E)

Source§

type F = unsafe extern "system-unwind" fn(A, B, C, D, E) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Safe, C, Output> for (A, B, C, D, E, F)

Source§

type F = extern "C" fn(A, B, C, D, E, F) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Safe, CUnwind, Output> for (A, B, C, D, E, F)

Source§

type F = extern "C-unwind" fn(A, B, C, D, E, F) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Safe, EfiApi, Output> for (A, B, C, D, E, F)

Source§

type F = extern "efiapi" fn(A, B, C, D, E, F) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Safe, Rust, Output> for (A, B, C, D, E, F)

Source§

type F = fn(A, B, C, D, E, F) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Safe, SysV64, Output> for (A, B, C, D, E, F)

Source§

type F = extern "sysv64" fn(A, B, C, D, E, F) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Safe, SysV64Unwind, Output> for (A, B, C, D, E, F)

Source§

type F = extern "sysv64-unwind" fn(A, B, C, D, E, F) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Safe, System, Output> for (A, B, C, D, E, F)

Source§

type F = extern "system" fn(A, B, C, D, E, F) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Safe, SystemUnwind, Output> for (A, B, C, D, E, F)

Source§

type F = extern "system-unwind" fn(A, B, C, D, E, F) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Unsafe, C, Output> for (A, B, C, D, E, F)

Source§

type F = unsafe extern "C" fn(A, B, C, D, E, F) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Unsafe, CUnwind, Output> for (A, B, C, D, E, F)

Source§

type F = unsafe extern "C-unwind" fn(A, B, C, D, E, F) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Unsafe, EfiApi, Output> for (A, B, C, D, E, F)

Source§

type F = unsafe extern "efiapi" fn(A, B, C, D, E, F) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Unsafe, Rust, Output> for (A, B, C, D, E, F)

Source§

type F = unsafe fn(A, B, C, D, E, F) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Unsafe, SysV64, Output> for (A, B, C, D, E, F)

Source§

type F = unsafe extern "sysv64" fn(A, B, C, D, E, F) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Unsafe, SysV64Unwind, Output> for (A, B, C, D, E, F)

Source§

type F = unsafe extern "sysv64-unwind" fn(A, B, C, D, E, F) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Unsafe, System, Output> for (A, B, C, D, E, F)

Source§

type F = unsafe extern "system" fn(A, B, C, D, E, F) -> Output

Source§

impl<Output, A, B, C, D, E, F> BuildFn<Unsafe, SystemUnwind, Output> for (A, B, C, D, E, F)

Source§

type F = unsafe extern "system-unwind" fn(A, B, C, D, E, F) -> Output

Implementors§