Struct mlua::HookTriggers[][src]

pub struct HookTriggers {
    pub on_calls: bool,
    pub on_returns: bool,
    pub every_line: bool,
    pub every_nth_instruction: Option<u32>,
}

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.

Trait Implementations

impl Clone for HookTriggers[src]

impl Copy for HookTriggers[src]

impl Debug for HookTriggers[src]

impl Default for HookTriggers[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.