Attribute Macro hookable

Source
#[hookable]
Expand description

This macro is used to mark a function as hookable, without changing the signature. It generates some extra codes to support hooks, and registers the function to the inventory.

Not Supported:

  • functions with generic types
  • functions with self receiver
  • functions returns references

ยงExamples:

#[hookable("add")]
fn add(left: i64, right: i64) -> i64 {
   left + right
}