FnPtr

Trait FnPtr 

Source
pub trait FnPtr:
    PartialEq
    + Eq
    + PartialOrd
    + Ord
    + Hash
    + Pointer
    + Debug
    + Clone
    + Copy
    + Send
    + Sync
    + Unpin
    + UnwindSafe
    + RefUnwindSafe
    + Sized
    + 'static
    + WithSafety<true>
    + WithSafety<false>
    + WithAbi<{ _ }>
    + WithAbi<{ _ }>
    + WithAbi<{ _ }> {
    type Args;
    type Output;

    const ARITY: usize;
    const IS_SAFE: bool;
    const IS_EXTERN: bool;
    const ABI: Abi;

    // Required methods
    fn as_ptr(&self) -> UntypedFnPtr;
    unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self;

    // Provided methods
    fn addr(&self) -> usize { ... }
    unsafe fn from_addr(addr: usize) -> Self { ... }
    fn as_unsafe(&self) -> <Self as WithSafety<{ false }>>::F { ... }
    unsafe fn as_safe(&self) -> <Self as WithSafety<{ true }>>::F { ... }
    unsafe fn with_abi<const ABI: u8>(&self) -> <Self as WithAbi<ABI>>::F
       where Self: WithAbi<ABI> { ... }
}
Expand description

Marker trait for all function pointers.

Required Associated Constants§

Source

const ARITY: usize

The function’s arity (number of arguments).

Source

const IS_SAFE: bool

Whether the function pointer is safe (fn) or unsafe (unsafe fn).

Source

const IS_EXTERN: bool

Whether the function pointer uses an extern calling convention.

Source

const ABI: Abi

The ABI associated with this function pointer.

Required Associated Types§

Source

type Args

The argument types as a tuple.

Source

type Output

The return type.

Required Methods§

Source

fn as_ptr(&self) -> UntypedFnPtr

Returns a untyped function pointer for this function.

Source

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Constructs an instance from an untyped function pointer.

§Safety

This function is unsafe because it can not check if the argument points to a function of the correct type.

Provided Methods§

Source

fn addr(&self) -> usize

Returns the address of this function.

Source

unsafe fn from_addr(addr: usize) -> Self

Constructs an instance from an address.

§Safety

This function is unsafe because it can not check if the argument points to a function of the correct type.

Source

fn as_unsafe(&self) -> <Self as WithSafety<{ false }>>::F

Produces an unsafe version of this function pointer.

Source

unsafe fn as_safe(&self) -> <Self as WithSafety<{ true }>>::F

Produces a safe version of this function pointer.

§Safety

Caller must ensure the underlying function is actually safe to call.

Source

unsafe fn with_abi<const ABI: u8>(&self) -> <Self as WithAbi<ABI>>::F
where Self: WithAbi<ABI>,

Produces a version of this function pointer with the given ABI.

§Safety

Caller must ensure that the resulting ABI transformation is sound.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<Ret: 'static> FnPtr for fn() -> Ret

Source§

const ARITY: usize = 0usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = false

Source§

const ABI: Abi = crate::Abi::Rust

Source§

type Args = ()

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static> FnPtr for extern "C" fn() -> Ret

Source§

const ARITY: usize = 0usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::C

Source§

type Args = ()

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static> FnPtr for extern "system" fn() -> Ret

Source§

const ARITY: usize = 0usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::System

Source§

type Args = ()

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static> FnPtr for extern "sysv64" fn() -> Ret

Source§

const ARITY: usize = 0usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::Sysv64

Source§

type Args = ()

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static> FnPtr for unsafe fn() -> Ret

Source§

const ARITY: usize = 0usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = false

Source§

const ABI: Abi = crate::Abi::Rust

Source§

type Args = ()

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static> FnPtr for unsafe extern "C" fn() -> Ret

Source§

const ARITY: usize = 0usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::C

Source§

type Args = ()

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static> FnPtr for unsafe extern "system" fn() -> Ret

Source§

const ARITY: usize = 0usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::System

Source§

type Args = ()

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static> FnPtr for unsafe extern "sysv64" fn() -> Ret

Source§

const ARITY: usize = 0usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::Sysv64

Source§

type Args = ()

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static> FnPtr for fn(A) -> Ret

Source§

const ARITY: usize = 1usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = false

Source§

const ABI: Abi = crate::Abi::Rust

Source§

type Args = (A,)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static> FnPtr for extern "C" fn(A) -> Ret

Source§

const ARITY: usize = 1usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::C

Source§

type Args = (A,)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static> FnPtr for extern "system" fn(A) -> Ret

Source§

const ARITY: usize = 1usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::System

Source§

type Args = (A,)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static> FnPtr for extern "sysv64" fn(A) -> Ret

Source§

const ARITY: usize = 1usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::Sysv64

Source§

type Args = (A,)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static> FnPtr for unsafe fn(A) -> Ret

Source§

const ARITY: usize = 1usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = false

Source§

const ABI: Abi = crate::Abi::Rust

Source§

type Args = (A,)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static> FnPtr for unsafe extern "C" fn(A) -> Ret

Source§

const ARITY: usize = 1usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::C

Source§

type Args = (A,)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static> FnPtr for unsafe extern "system" fn(A) -> Ret

Source§

const ARITY: usize = 1usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::System

Source§

type Args = (A,)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static> FnPtr for unsafe extern "sysv64" fn(A) -> Ret

Source§

const ARITY: usize = 1usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::Sysv64

Source§

type Args = (A,)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static> FnPtr for fn(A, B) -> Ret

Source§

const ARITY: usize = 2usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = false

Source§

const ABI: Abi = crate::Abi::Rust

Source§

type Args = (A, B)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static> FnPtr for extern "C" fn(A, B) -> Ret

Source§

const ARITY: usize = 2usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::C

Source§

type Args = (A, B)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static> FnPtr for extern "system" fn(A, B) -> Ret

Source§

const ARITY: usize = 2usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::System

Source§

type Args = (A, B)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static> FnPtr for extern "sysv64" fn(A, B) -> Ret

Source§

const ARITY: usize = 2usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::Sysv64

Source§

type Args = (A, B)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static> FnPtr for unsafe fn(A, B) -> Ret

Source§

const ARITY: usize = 2usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = false

Source§

const ABI: Abi = crate::Abi::Rust

Source§

type Args = (A, B)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static> FnPtr for unsafe extern "C" fn(A, B) -> Ret

Source§

const ARITY: usize = 2usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::C

Source§

type Args = (A, B)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static> FnPtr for unsafe extern "system" fn(A, B) -> Ret

Source§

const ARITY: usize = 2usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::System

Source§

type Args = (A, B)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static> FnPtr for unsafe extern "sysv64" fn(A, B) -> Ret

Source§

const ARITY: usize = 2usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::Sysv64

Source§

type Args = (A, B)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static> FnPtr for fn(A, B, C) -> Ret

Source§

const ARITY: usize = 3usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = false

Source§

const ABI: Abi = crate::Abi::Rust

Source§

type Args = (A, B, C)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static> FnPtr for extern "C" fn(A, B, C) -> Ret

Source§

const ARITY: usize = 3usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::C

Source§

type Args = (A, B, C)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static> FnPtr for extern "system" fn(A, B, C) -> Ret

Source§

const ARITY: usize = 3usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::System

Source§

type Args = (A, B, C)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static> FnPtr for extern "sysv64" fn(A, B, C) -> Ret

Source§

const ARITY: usize = 3usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::Sysv64

Source§

type Args = (A, B, C)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static> FnPtr for unsafe fn(A, B, C) -> Ret

Source§

const ARITY: usize = 3usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = false

Source§

const ABI: Abi = crate::Abi::Rust

Source§

type Args = (A, B, C)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static> FnPtr for unsafe extern "C" fn(A, B, C) -> Ret

Source§

const ARITY: usize = 3usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::C

Source§

type Args = (A, B, C)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static> FnPtr for unsafe extern "system" fn(A, B, C) -> Ret

Source§

const ARITY: usize = 3usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::System

Source§

type Args = (A, B, C)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static> FnPtr for unsafe extern "sysv64" fn(A, B, C) -> Ret

Source§

const ARITY: usize = 3usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::Sysv64

Source§

type Args = (A, B, C)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static> FnPtr for fn(A, B, C, D) -> Ret

Source§

const ARITY: usize = 4usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = false

Source§

const ABI: Abi = crate::Abi::Rust

Source§

type Args = (A, B, C, D)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static> FnPtr for extern "C" fn(A, B, C, D) -> Ret

Source§

const ARITY: usize = 4usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::C

Source§

type Args = (A, B, C, D)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static> FnPtr for extern "system" fn(A, B, C, D) -> Ret

Source§

const ARITY: usize = 4usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::System

Source§

type Args = (A, B, C, D)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static> FnPtr for extern "sysv64" fn(A, B, C, D) -> Ret

Source§

const ARITY: usize = 4usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::Sysv64

Source§

type Args = (A, B, C, D)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static> FnPtr for unsafe fn(A, B, C, D) -> Ret

Source§

const ARITY: usize = 4usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = false

Source§

const ABI: Abi = crate::Abi::Rust

Source§

type Args = (A, B, C, D)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static> FnPtr for unsafe extern "C" fn(A, B, C, D) -> Ret

Source§

const ARITY: usize = 4usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::C

Source§

type Args = (A, B, C, D)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static> FnPtr for unsafe extern "system" fn(A, B, C, D) -> Ret

Source§

const ARITY: usize = 4usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::System

Source§

type Args = (A, B, C, D)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static> FnPtr for unsafe extern "sysv64" fn(A, B, C, D) -> Ret

Source§

const ARITY: usize = 4usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::Sysv64

Source§

type Args = (A, B, C, D)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static> FnPtr for fn(A, B, C, D, E) -> Ret

Source§

const ARITY: usize = 5usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = false

Source§

const ABI: Abi = crate::Abi::Rust

Source§

type Args = (A, B, C, D, E)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static> FnPtr for extern "C" fn(A, B, C, D, E) -> Ret

Source§

const ARITY: usize = 5usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::C

Source§

type Args = (A, B, C, D, E)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static> FnPtr for extern "system" fn(A, B, C, D, E) -> Ret

Source§

const ARITY: usize = 5usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::System

Source§

type Args = (A, B, C, D, E)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static> FnPtr for extern "sysv64" fn(A, B, C, D, E) -> Ret

Source§

const ARITY: usize = 5usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::Sysv64

Source§

type Args = (A, B, C, D, E)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static> FnPtr for unsafe fn(A, B, C, D, E) -> Ret

Source§

const ARITY: usize = 5usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = false

Source§

const ABI: Abi = crate::Abi::Rust

Source§

type Args = (A, B, C, D, E)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static> FnPtr for unsafe extern "C" fn(A, B, C, D, E) -> Ret

Source§

const ARITY: usize = 5usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::C

Source§

type Args = (A, B, C, D, E)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static> FnPtr for unsafe extern "system" fn(A, B, C, D, E) -> Ret

Source§

const ARITY: usize = 5usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::System

Source§

type Args = (A, B, C, D, E)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static> FnPtr for unsafe extern "sysv64" fn(A, B, C, D, E) -> Ret

Source§

const ARITY: usize = 5usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::Sysv64

Source§

type Args = (A, B, C, D, E)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static> FnPtr for fn(A, B, C, D, E, F) -> Ret

Source§

const ARITY: usize = 6usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = false

Source§

const ABI: Abi = crate::Abi::Rust

Source§

type Args = (A, B, C, D, E, F)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static> FnPtr for extern "C" fn(A, B, C, D, E, F) -> Ret

Source§

const ARITY: usize = 6usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::C

Source§

type Args = (A, B, C, D, E, F)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static> FnPtr for extern "system" fn(A, B, C, D, E, F) -> Ret

Source§

const ARITY: usize = 6usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::System

Source§

type Args = (A, B, C, D, E, F)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static> FnPtr for extern "sysv64" fn(A, B, C, D, E, F) -> Ret

Source§

const ARITY: usize = 6usize

Source§

const IS_SAFE: bool = true

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::Sysv64

Source§

type Args = (A, B, C, D, E, F)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static> FnPtr for unsafe fn(A, B, C, D, E, F) -> Ret

Source§

const ARITY: usize = 6usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = false

Source§

const ABI: Abi = crate::Abi::Rust

Source§

type Args = (A, B, C, D, E, F)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static> FnPtr for unsafe extern "C" fn(A, B, C, D, E, F) -> Ret

Source§

const ARITY: usize = 6usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::C

Source§

type Args = (A, B, C, D, E, F)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static> FnPtr for unsafe extern "system" fn(A, B, C, D, E, F) -> Ret

Source§

const ARITY: usize = 6usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::System

Source§

type Args = (A, B, C, D, E, F)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Source§

impl<Ret: 'static, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static> FnPtr for unsafe extern "sysv64" fn(A, B, C, D, E, F) -> Ret

Source§

const ARITY: usize = 6usize

Source§

const IS_SAFE: bool = false

Source§

const IS_EXTERN: bool = true

Source§

const ABI: Abi = crate::Abi::Sysv64

Source§

type Args = (A, B, C, D, E, F)

Source§

type Output = Ret

Source§

fn as_ptr(&self) -> UntypedFnPtr

Source§

unsafe fn from_ptr(ptr: UntypedFnPtr) -> Self

Implementors§