pub enum AfterClose {
Block,
Return {
abs_a: u32,
nret: u32,
from_native: bool,
},
ResumeUnwind {
func_slot: u32,
err: Value,
},
}Expand description
What to run once begin_close has drained every tbc slot.
Variants§
Block
OP_Close (block-end close): nothing else; next instruction continues.
Return
OP_Return*: pop the Lua frame whose OP_Return triggered the close
and deliver nret results from [abs_a, abs_a + nret) to the frame’s
func_slot. from_native mirrors the original op’s hook flag.
Fields
ResumeUnwind
Error unwind: the close runs while unwinding a Lua frame. When every
handler is done, pop the deferred Lua frame, truncate to func_slot,
and re-raise — preferring a handler-raised error over err (PUC
luaF_close).
Trait Implementations§
Source§impl Clone for AfterClose
impl Clone for AfterClose
Source§fn clone(&self) -> AfterClose
fn clone(&self) -> AfterClose
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AfterClose
Auto Trait Implementations§
impl !RefUnwindSafe for AfterClose
impl !Send for AfterClose
impl !Sync for AfterClose
impl !UnwindSafe for AfterClose
impl Freeze for AfterClose
impl Unpin for AfterClose
impl UnsafeUnpin for AfterClose
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