Skip to main content

trampoline

Macro trampoline 

Source
macro_rules! trampoline {
    (pub fn $name:ident($($arg_names:ident: $arg_types:ty),* $(,)?) -> $ret:ty;) => { ... };
}
Expand description

Macro to define a trampoline function for a given function signature.

This macro generates:

  1. An external “C” function that serves as the trampoline, generic on a specific function pointer.
  2. A companion module containing a non-generic inner function, and the function pointer type.
⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here