#[repr(i32)]pub enum HookEvent {
Call = 0,
Return = 1,
Line = 2,
Count = 3,
}Expand description
All possible event types that can call the current Hook.
Variants§
Call = 0
Calls the current Hook whenever a function is called, just after Lua enters the function but before it receives its arguments.
Return = 1
Calls the current Hook whenever a called function returns, just before Lua leaves the function.
The values being returned by the returning function cannot be accessed.
Line = 2
Calls the current Hook whenever a new line of code is executed or when Lua jumps back to a previous (or the same) line.
This event only happens for Lua functions (not CFunctions).
Count = 3
Calls the current Hook every time after Lua executes a specified amount of instructions (see LuaState::set_hook).
This event only happens for Lua functions (not CFunctions).
Implementations§
Source§impl HookEvent
impl HookEvent
Sourcepub const MASK_CALL: i32 = ffi::LUA_MASKCALL
pub const MASK_CALL: i32 = ffi::LUA_MASKCALL
HookEvent::Call’s mask value.
See LuaState::set_hook for more information.
Sourcepub const MASK_RETURN: i32 = ffi::LUA_MASKRET
pub const MASK_RETURN: i32 = ffi::LUA_MASKRET
HookEvent::Return’s mask value.
See LuaState::set_hook for more information.
Sourcepub const MASK_LINE: i32 = ffi::LUA_MASKLINE
pub const MASK_LINE: i32 = ffi::LUA_MASKLINE
HookEvent::Line’s mask value.
See LuaState::set_hook for more information.
Sourcepub const MASK_COUNT: i32 = ffi::LUA_MASKCOUNT
pub const MASK_COUNT: i32 = ffi::LUA_MASKCOUNT
HookEvent::Count’s mask value.
See LuaState::set_hook for more information.
Sourcepub const fn as_mask(self) -> i32
pub const fn as_mask(self) -> i32
Returns this HookEvent’s mask value.
See LuaState::set_hook for more information.