pub fn inspect_stack(&self, level: usize) -> Option<Debug> {
        unsafe {
            let mut ar: ffi::lua_Debug = mem::zeroed();
            let level = level as c_int;
            #[cfg(not(feature = "luau"))]
            if ffi::lua_getstack(self.state, level, &mut ar) == 0 {
                return None;
            }
            #[cfg(feature = "luau")]
            if ffi::lua_getinfo(self.state, level, cstr!(""), &mut ar) == 0 {
                return None;
            }
            Some(Debug::new_owned(self, level, ar))
        }
    }
/// Gets information about the interpreter runtime stack.
///
/// This function returns [`Debug`] structure that can be used to get information about the function
/// executing at a given level. Level `0` is the current running function, whereas level `n+1` is the
/// function that has called level `n` (except for tail calls, which do not count in the stack).
///
/// [`Debug`]: crate::hook::Debug
Gets information about the interpreter runtime stack.
This function returns [`Debug`] structure that can be used to get information about the function
executing at a given level.


Gets information about the interpreter runtime stack . This function returns [ ` Debug ` ] structure that can be used to get information about the function executing at a given level .
pub fn inspect_stack(&self, level: usize) -> Option<Debug> {
        unsafe {
            let mut ar: ffi::lua_Debug = mem::zeroed();
            let level = level as c_int;
            #[cfg(not(feature = "luau"))]
            if ffi::lua_getstack(self.state, level, &mut ar) == 0 {
                return None;
            }
            #[cfg(feature = "luau")]
            if ffi::lua_getinfo(self.state, level, cstr!(""), &mut ar) == 0 {
                return None;
            }
            Some(Debug::new_owned(self, level, ar))
        }
    }
pub fn inspect_stack ( & self , level : usize ) -> Option < Debug > { unsafe { let mut ar : ffi :: lua_Debug = mem :: zeroed ( ) ; let level = level as c_int ; # [ cfg ( not ( feature " " ) ) ] if ffi :: lua_getstack ( self . state , level , & mut ar ) == 0 { return None ; } # [ cfg ( feature " " ) ] if ffi :: lua_getinfo ( self . state , level , cstr ! ( " " ) , & mut ar ) == 0 { return None ; } Some ( Debug :: new_owned ( self , level , ar ) ) } }
Gets information about the interpreter runtime stack.
Gets information about the interpreter runtime stack .
&self
level
usize
&self
level
usize