Skip to main content

FnPointer

Trait FnPointer 

Source
pub trait FnPointer<Args, Marker>:
    HotFunction<Args, Marker>
    + Copy
    + Sealed {
    // Required methods
    fn address(&self) -> u64;
    unsafe fn call_at(address: u64, args: Args) -> Self::Return;
}
Expand description

A plain, non-higher-ranked function-pointer type fn(A, ..) -> R of up to nine arguments: the only types HotFn::from_fn_ptr accepts. Sealed; implemented by this crate only.

Required Methods§

Source

fn address(&self) -> u64

The function’s address, the jump-table key.

Source

unsafe fn call_at(address: u64, args: Args) -> Self::Return

Call the function at address as Self.

§Safety

address must be a function of exactly type Self.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§