pub struct Debug<'lua> { /* private fields */ }
Expand description
Contains information about currently executing Lua code.
The Debug
structure is provided as a parameter to the hook function set with
Lua::set_hook
. You may call the methods on this structure to retrieve information about the
Lua code executing at the time that the hook function was called. Further information can be
found in the Lua documentation.
Implementations
sourceimpl<'lua> Debug<'lua>
impl<'lua> Debug<'lua>
sourcepub fn event(&self) -> DebugEvent
This is supported on non-crate feature luau
only.
pub fn event(&self) -> DebugEvent
luau
only.Returns the specific event that triggered the hook.
For Lua 5.1 DebugEvent::TailCall
is used for return events to indicate a return
from a function that did a tail call.
sourcepub fn names(&self) -> DebugNames<'lua>
pub fn names(&self) -> DebugNames<'lua>
Corresponds to the n
what mask.
sourcepub fn source(&self) -> DebugSource<'lua>
pub fn source(&self) -> DebugSource<'lua>
Corresponds to the S
what mask.
sourcepub fn is_tail_call(&self) -> bool
This is supported on non-crate feature luau
only.
pub fn is_tail_call(&self) -> bool
luau
only.Corresponds to the t
what mask. Returns true if the hook is in a function tail call, false
otherwise.
sourcepub fn stack(&self) -> DebugStack
pub fn stack(&self) -> DebugStack
Corresponds to the u
what mask.
Auto Trait Implementations
impl<'lua> !RefUnwindSafe for Debug<'lua>
impl<'lua> !Send for Debug<'lua>
impl<'lua> !Sync for Debug<'lua>
impl<'lua> Unpin for Debug<'lua>
impl<'lua> !UnwindSafe for Debug<'lua>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more