Macro red4ext_rs::hooks

source ·
macro_rules! hooks {
    ($(static $name:ident: fn($($arg:ident: $ty:ty),*) -> $ret:ty;)*) => { ... };
}
Expand description

Defines a set of hooks that can be attached to target functions. The hooks are defined as static variables and must be initialized with a call to SdkEnv::attach_hook.

§Example

use red4ext_rs::hooks;

hooks! {
   static ADD_HOOK: fn(a: u32, b: u32) -> u32;
}