Skip to main content

HotFunction

Trait HotFunction 

Source
pub trait HotFunction<Args, Marker> {
    type Return;

    // Required method
    fn call_it(&mut self, args: Args) -> Self::Return;
}
Expand description

A function that can be detoured through the jump table: implemented for every FnMut of up to nine arguments (taken as a tuple). FnOnce is excluded because a patch may re-run the function.

Required Associated Types§

Source

type Return

The function’s return type.

Required Methods§

Source

fn call_it(&mut self, args: Args) -> Self::Return

Call the function with its arguments as a tuple.

The rust-call ABI is unstable, so this wrapper gives every implementing type a stable, real function per monomorphisation: the address the jump table is keyed on.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§