pub enum CallFrame {
Lua(Frame),
Cont(NativeCont),
}Expand description
An entry on a thread’s call stack: either a Lua activation record or a continuation frame standing in for a yieldable native (pcall/xpcall).
A Cont sits just below the call it protects. When that call returns,
yields-to-completion, or errors, the interpreter consumes the Cont to wrap
the outcome — the analogue of PUC lua_pcallk’s continuation k. Keeping it
on the same stack as Lua frames means a coroutine.yield crossing it is
preserved and restored automatically with the thread’s saved context.
Variants§
Lua(Frame)
A Lua activation record.
Cont(NativeCont)
A continuation guarding a yieldable native call (pcall / xpcall /
metamethod / __close / __pairs).
Tuple Fields
§
0: NativeContThe continuation record.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CallFrame
impl !Send for CallFrame
impl !Sync for CallFrame
impl !UnwindSafe for CallFrame
impl Freeze for CallFrame
impl Unpin for CallFrame
impl UnsafeUnpin for CallFrame
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
Mutably borrows from an owned value. Read more