Skip to main content

SafeFnPtr

Trait SafeFnPtr 

Source
pub trait SafeFnPtr: FnPtr<Safety = Safe> {
    // Required method
    fn invoke(&self, args: Self::Args) -> Self::Output;
}
Expand description

Marker trait for all callable safe function pointer types (fn / extern fn).

Required Methods§

Source

fn invoke(&self, args: Self::Args) -> Self::Output

Invokes the function pointed to with the given args.

§Examples
fn add(a: i32, b: i32) -> i32 { a + b }

let f: fn(i32, i32) -> i32 = add;
let result = f.invoke((2, 3));
assert_eq!(result, 5);

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<Output, A, B, C, D, E, F> SafeFnPtr for extern "C" fn(A, B, C, D, E, F) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D, E, F> SafeFnPtr for extern "C-unwind" fn(A, B, C, D, E, F) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D, E, F> SafeFnPtr for extern "efiapi" fn(A, B, C, D, E, F) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D, E, F> SafeFnPtr for extern "system" fn(A, B, C, D, E, F) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D, E, F> SafeFnPtr for extern "system-unwind" fn(A, B, C, D, E, F) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D, E, F> SafeFnPtr for extern "sysv64" fn(A, B, C, D, E, F) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D, E, F> SafeFnPtr for extern "sysv64-unwind" fn(A, B, C, D, E, F) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D, E, F> SafeFnPtr for fn(A, B, C, D, E, F) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D, E> SafeFnPtr for extern "C" fn(A, B, C, D, E) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D, E> SafeFnPtr for extern "C-unwind" fn(A, B, C, D, E) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D, E> SafeFnPtr for extern "efiapi" fn(A, B, C, D, E) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D, E> SafeFnPtr for extern "system" fn(A, B, C, D, E) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D, E> SafeFnPtr for extern "system-unwind" fn(A, B, C, D, E) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D, E> SafeFnPtr for extern "sysv64" fn(A, B, C, D, E) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D, E> SafeFnPtr for extern "sysv64-unwind" fn(A, B, C, D, E) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D, E> SafeFnPtr for fn(A, B, C, D, E) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3, __arg_4): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D> SafeFnPtr for extern "C" fn(A, B, C, D) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D> SafeFnPtr for extern "C-unwind" fn(A, B, C, D) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D> SafeFnPtr for extern "efiapi" fn(A, B, C, D) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D> SafeFnPtr for extern "system" fn(A, B, C, D) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D> SafeFnPtr for extern "system-unwind" fn(A, B, C, D) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D> SafeFnPtr for extern "sysv64" fn(A, B, C, D) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D> SafeFnPtr for extern "sysv64-unwind" fn(A, B, C, D) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C, D> SafeFnPtr for fn(A, B, C, D) -> Output

Source§

fn invoke( &self, (__arg_0, __arg_1, __arg_2, __arg_3): Self::Args, ) -> Self::Output

Source§

impl<Output, A, B, C> SafeFnPtr for extern "C" fn(A, B, C) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1, __arg_2): Self::Args) -> Self::Output

Source§

impl<Output, A, B, C> SafeFnPtr for extern "C-unwind" fn(A, B, C) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1, __arg_2): Self::Args) -> Self::Output

Source§

impl<Output, A, B, C> SafeFnPtr for extern "efiapi" fn(A, B, C) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1, __arg_2): Self::Args) -> Self::Output

Source§

impl<Output, A, B, C> SafeFnPtr for extern "system" fn(A, B, C) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1, __arg_2): Self::Args) -> Self::Output

Source§

impl<Output, A, B, C> SafeFnPtr for extern "system-unwind" fn(A, B, C) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1, __arg_2): Self::Args) -> Self::Output

Source§

impl<Output, A, B, C> SafeFnPtr for extern "sysv64" fn(A, B, C) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1, __arg_2): Self::Args) -> Self::Output

Source§

impl<Output, A, B, C> SafeFnPtr for extern "sysv64-unwind" fn(A, B, C) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1, __arg_2): Self::Args) -> Self::Output

Source§

impl<Output, A, B, C> SafeFnPtr for fn(A, B, C) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1, __arg_2): Self::Args) -> Self::Output

Source§

impl<Output, A, B> SafeFnPtr for extern "C" fn(A, B) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1): Self::Args) -> Self::Output

Source§

impl<Output, A, B> SafeFnPtr for extern "C-unwind" fn(A, B) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1): Self::Args) -> Self::Output

Source§

impl<Output, A, B> SafeFnPtr for extern "efiapi" fn(A, B) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1): Self::Args) -> Self::Output

Source§

impl<Output, A, B> SafeFnPtr for extern "system" fn(A, B) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1): Self::Args) -> Self::Output

Source§

impl<Output, A, B> SafeFnPtr for extern "system-unwind" fn(A, B) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1): Self::Args) -> Self::Output

Source§

impl<Output, A, B> SafeFnPtr for extern "sysv64" fn(A, B) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1): Self::Args) -> Self::Output

Source§

impl<Output, A, B> SafeFnPtr for extern "sysv64-unwind" fn(A, B) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1): Self::Args) -> Self::Output

Source§

impl<Output, A, B> SafeFnPtr for fn(A, B) -> Output

Source§

fn invoke(&self, (__arg_0, __arg_1): Self::Args) -> Self::Output

Source§

impl<Output, A> SafeFnPtr for extern "C" fn(A) -> Output

Source§

fn invoke(&self, (__arg_0): Self::Args) -> Self::Output

Source§

impl<Output, A> SafeFnPtr for extern "C-unwind" fn(A) -> Output

Source§

fn invoke(&self, (__arg_0): Self::Args) -> Self::Output

Source§

impl<Output, A> SafeFnPtr for extern "efiapi" fn(A) -> Output

Source§

fn invoke(&self, (__arg_0): Self::Args) -> Self::Output

Source§

impl<Output, A> SafeFnPtr for extern "system" fn(A) -> Output

Source§

fn invoke(&self, (__arg_0): Self::Args) -> Self::Output

Source§

impl<Output, A> SafeFnPtr for extern "system-unwind" fn(A) -> Output

Source§

fn invoke(&self, (__arg_0): Self::Args) -> Self::Output

Source§

impl<Output, A> SafeFnPtr for extern "sysv64" fn(A) -> Output

Source§

fn invoke(&self, (__arg_0): Self::Args) -> Self::Output

Source§

impl<Output, A> SafeFnPtr for extern "sysv64-unwind" fn(A) -> Output

Source§

fn invoke(&self, (__arg_0): Self::Args) -> Self::Output

Source§

impl<Output, A> SafeFnPtr for fn(A) -> Output

Source§

fn invoke(&self, (__arg_0): Self::Args) -> Self::Output

Source§

impl<Output> SafeFnPtr for extern "C" fn() -> Output

Source§

fn invoke(&self, (): Self::Args) -> Self::Output

Source§

impl<Output> SafeFnPtr for extern "C-unwind" fn() -> Output

Source§

fn invoke(&self, (): Self::Args) -> Self::Output

Source§

impl<Output> SafeFnPtr for extern "efiapi" fn() -> Output

Source§

fn invoke(&self, (): Self::Args) -> Self::Output

Source§

impl<Output> SafeFnPtr for extern "system" fn() -> Output

Source§

fn invoke(&self, (): Self::Args) -> Self::Output

Source§

impl<Output> SafeFnPtr for extern "system-unwind" fn() -> Output

Source§

fn invoke(&self, (): Self::Args) -> Self::Output

Source§

impl<Output> SafeFnPtr for extern "sysv64" fn() -> Output

Source§

fn invoke(&self, (): Self::Args) -> Self::Output

Source§

impl<Output> SafeFnPtr for extern "sysv64-unwind" fn() -> Output

Source§

fn invoke(&self, (): Self::Args) -> Self::Output

Source§

impl<Output> SafeFnPtr for fn() -> Output

Source§

fn invoke(&self, (): Self::Args) -> Self::Output

Implementors§