Trait FnPtr
pub trait FnPtr: Copy
A common trait implemented by all function pointers.
Required Methods
fn as_ptr(self) -> NonNull<Code>Returns the function pointer as a [
NonNull<Code>].unsafe fn from_ptr(ptr: NonNull<Code>) -> SelfConstructs a function pointer from a
NonNullpointer.Safety
The function pointer must have been obtained from an
FnPtr::as_ptrcall from a function pointer type that is ABI compatible.
Provided Methods
fn addr(self) -> usizeReturns the address of the function pointer.