pub struct HookTriggers {
pub on_calls: bool,
pub on_returns: bool,
pub every_line: bool,
pub every_nth_instruction: Option<u32>,
}luau only.Expand description
Determines when a hook function will be called by Lua.
Fields§
§on_calls: boolBefore a function call.
on_returns: boolWhen Lua returns from a function.
every_line: boolBefore executing a new line, or returning from a function call.
every_nth_instruction: Option<u32>After a certain number of VM instructions have been executed. When set to Some(count),
count is the number of VM instructions to execute before calling the hook.
§Performance
Setting this option to a low value can incur a very high overhead.
Implementations§
Source§impl HookTriggers
impl HookTriggers
Sourcepub const ON_RETURNS: Self
pub const ON_RETURNS: Self
An instance of HookTriggers with on_returns trigger set.
Sourcepub const EVERY_LINE: Self
pub const EVERY_LINE: Self
An instance of HookTriggers with every_line trigger set.
Sourcepub const fn on_calls(self) -> Self
pub const fn on_calls(self) -> Self
Returns an instance of HookTriggers with on_calls trigger set.
Sourcepub const fn on_returns(self) -> Self
pub const fn on_returns(self) -> Self
Returns an instance of HookTriggers with on_returns trigger set.
Sourcepub const fn every_line(self) -> Self
pub const fn every_line(self) -> Self
Returns an instance of HookTriggers with every_line trigger set.
Sourcepub const fn every_nth_instruction(self, n: u32) -> Self
pub const fn every_nth_instruction(self, n: u32) -> Self
Returns an instance of HookTriggers with every_nth_instruction trigger set.
Trait Implementations§
Source§impl BitOr for HookTriggers
impl BitOr for HookTriggers
Source§impl BitOrAssign for HookTriggers
impl BitOrAssign for HookTriggers
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl Clone for HookTriggers
impl Clone for HookTriggers
Source§fn clone(&self) -> HookTriggers
fn clone(&self) -> HookTriggers
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HookTriggers
impl Debug for HookTriggers
Source§impl Default for HookTriggers
impl Default for HookTriggers
Source§fn default() -> HookTriggers
fn default() -> HookTriggers
impl Copy for HookTriggers
Auto Trait Implementations§
impl Freeze for HookTriggers
impl RefUnwindSafe for HookTriggers
impl Send for HookTriggers
impl Sync for HookTriggers
impl Unpin for HookTriggers
impl UnwindSafe for HookTriggers
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more