mirror of
https://github.com/mailscope/kumomta.git
synced 2026-10-30 18:16:51 +00:00
There should be no functional change here; this commit refactors how we pre-declare CallbackSignatures with lua. The rationale is: * It is important to correct declare single vs. multiple implementation event handler types before any lua code is run; we've had a couple of issues in the past where some part of this pre-registration was messed up. * Adding a new signature requires declaring it in a global, and remembering to add its registration to the right place * Declaring signatures is a bit boilerplatey and makes it hard grok the purpose of the event handler arguments at a glance The declare_event! macro defined in this commit makes it a bit more readable to declare these event types and automatically wires up the registration to the correct spot, improving the ergonomics significantly. A downside of this additional layer of macro stuff that it requires increasing the rustc recursion limit.