Struct nvim_utils::prelude::LuaHookTriggers
source · pub struct LuaHookTriggers {
pub on_calls: bool,
pub on_returns: bool,
pub every_line: bool,
pub every_nth_instruction: Option<u32>,
}
Expand description
Determines when a hook function will be called by Lua.
Fields§
§on_calls: bool
Before a function call.
on_returns: bool
When Lua returns from a function.
every_line: bool
Before 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 fn on_calls() -> HookTriggers
pub fn on_calls() -> HookTriggers
Returns a new instance of HookTriggers
with on_calls
trigger set.
sourcepub fn on_returns() -> HookTriggers
pub fn on_returns() -> HookTriggers
Returns a new instance of HookTriggers
with on_returns
trigger set.
sourcepub fn every_line() -> HookTriggers
pub fn every_line() -> HookTriggers
Returns a new instance of HookTriggers
with every_line
trigger set.
sourcepub fn every_nth_instruction(n: u32) -> HookTriggers
pub fn every_nth_instruction(n: u32) -> HookTriggers
Returns a new instance of HookTriggers
with every_nth_instruction
trigger set.
Trait Implementations§
source§impl BitOr<HookTriggers> for HookTriggers
impl BitOr<HookTriggers> for HookTriggers
§type Output = HookTriggers
type Output = HookTriggers
The resulting type after applying the
|
operator.source§fn bitor(
self,
rhs: HookTriggers
) -> <HookTriggers as BitOr<HookTriggers>>::Output
fn bitor( self, rhs: HookTriggers ) -> <HookTriggers as BitOr<HookTriggers>>::Output
Performs the
|
operation. Read moresource§impl BitOrAssign<HookTriggers> for HookTriggers
impl BitOrAssign<HookTriggers> for HookTriggers
source§fn bitor_assign(&mut self, rhs: HookTriggers)
fn bitor_assign(&mut self, rhs: HookTriggers)
Performs the
|=
operation. Read moresource§impl Clone for HookTriggers
impl Clone for HookTriggers
source§fn clone(&self) -> HookTriggers
fn clone(&self) -> HookTriggers
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Returns the “default value” for a type. Read more