FnPtr

Trait FnPtr 

Source
pub trait FnPtr:
    PartialEq
    + Eq
    + PartialOrd
    + Ord
    + Hash
    + Pointer
    + Debug
    + Clone
    + Copy
    + Send
    + Sync
    + Unpin
    + UnwindSafe
    + RefUnwindSafe
    + 'static {
    type Args;
    type Output;

    const ARITY: usize;
    const IS_SAFE: bool;
    const IS_EXTERN: bool;
    const ABI: 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.

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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

Implementors§