pub struct HookState {
pub func: Option<Value>,
pub rust_func: Option<RustDebugHook>,
pub call: bool,
pub ret: bool,
pub line: bool,
pub count: bool,
pub count_base: i64,
pub count_left: i64,
}Expand description
Per-thread debug hook state (PUC lua_State hook/hookmask/basehookcount/
hookcount). func is the Lua hook; the booleans are the PUC mask bits.
Fields§
§func: Option<Value>the hook function (None when no hook is installed)
rust_func: Option<RustDebugHook>v1.1 B11 — Rust-side debug hook. Fires alongside the Lua hook (Rust first); both can be installed simultaneously, but most embedders pick one.
call: boolLUA_MASKCALL — fire on function entry
ret: boolLUA_MASKRET — fire on function return
line: boolLUA_MASKLINE — fire on source-line change
count: boolLUA_MASKCOUNT — fire every count_base instructions
count_base: i64instruction count between count events (PUC basehookcount)
count_left: i64instructions left until the next count event (PUC hookcount)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HookState
impl !Send for HookState
impl !Sync for HookState
impl !UnwindSafe for HookState
impl Freeze for HookState
impl Unpin for HookState
impl UnsafeUnpin for HookState
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