pub trait FunctionPointer:
Primitive
+ Copy
+ Sized {
type Args: Tuple;
type Return;
// Required methods
fn call(self, args: Self::Args) -> Self::Return;
fn cast_ptr<T: Sized, P: Pointer<T>>(self) -> P;
fn cast_int<T: Integer>(self) -> T;
}Required Associated Types§
Required Methods§
fn call(self, args: Self::Args) -> Self::Return
fn cast_ptr<T: Sized, P: Pointer<T>>(self) -> P
fn cast_int<T: Integer>(self) -> T
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<A1, R> FunctionPointer for fn(A1₁, A1₂, …, A1ₙ) -> R
This trait is implemented for function pointers with up to 12 arguments.
impl<A1, R> FunctionPointer for fn(A1₁, A1₂, …, A1ₙ) -> R
This trait is implemented for function pointers with up to 12 arguments.