pub struct Debug<'a> { /* private fields */ }
Expand description
Contains information about currently executing Lua code.
You may call the methods on this structure to retrieve information about the Lua code executing at the specific level. Further information can be found in the Lua documentation.
Implementations§
Source§impl<'a> Debug<'a>
impl<'a> Debug<'a>
Sourcepub fn event(&self) -> DebugEvent
Available 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 function(&self) -> Function
pub fn function(&self) -> Function
Returns the function that is running at the given level.
Corresponds to the f
“what” mask.
Sourcepub fn names(&self) -> DebugNames<'_>
pub fn names(&self) -> DebugNames<'_>
Corresponds to the n
“what” mask.
Sourcepub fn source(&self) -> DebugSource<'_>
pub fn source(&self) -> DebugSource<'_>
Corresponds to the S
“what” mask.
Sourcepub fn current_line(&self) -> Option<usize>
pub fn current_line(&self) -> Option<usize>
Corresponds to the l
“what” mask. Returns the current line.
Sourcepub fn is_tail_call(&self) -> bool
Available on crate features lua54
or lua53
or lua52
only.
pub fn is_tail_call(&self) -> bool
lua54
or lua53
or lua52
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<'a> Freeze for Debug<'a>
impl<'a> !RefUnwindSafe for Debug<'a>
impl<'a> !Send for Debug<'a>
impl<'a> !Sync for Debug<'a>
impl<'a> Unpin for Debug<'a>
impl<'a> !UnwindSafe for Debug<'a>
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> 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