pub struct HookDef {
pub id: Option<String>,
pub fql: String,
pub point: String,
pub script: Option<String>,
pub handler_inline: Option<String>,
pub priority: i32,
pub enabled: bool,
}Expand description
A single declarative hook definition.
Either script or handler_inline must be specified (but not both).
Fields§
§id: Option<String>Unique hook ID. Auto-generated if not specified.
fql: StringFQL pattern: which components this hook targets.
point: StringHook point: when this hook fires (e.g., “request.pre_dispatch”).
script: Option<String>Path to Lua script handler (relative to scripts.dirs).
handler_inline: Option<String>Inline Lua handler (for simple hooks).
priority: i32Priority (lower = earlier). Default: 100.
enabled: boolWhether the hook is enabled. Default: true.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HookDef
impl<'de> Deserialize<'de> for HookDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for HookDef
Auto Trait Implementations§
impl Freeze for HookDef
impl RefUnwindSafe for HookDef
impl Send for HookDef
impl Sync for HookDef
impl Unpin for HookDef
impl UnsafeUnpin for HookDef
impl UnwindSafe for HookDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more