pub struct LuaLClosure {
pub proto: GcRef<LuaProto>,
pub upvals: Vec<Cell<GcRef<UpVal>>>,
}Fields§
§proto: GcRef<LuaProto>§upvals: Vec<Cell<GcRef<UpVal>>>Each upvalue slot is held in a Cell so that debug.upvaluejoin
can replace an entry with another closure’s slot without rebuilding
the (shared) closure. GcRef<UpVal> is Copy (thin wrapper over
Gc<UpVal>), so a plain Cell is sufficient and skips RefCell
borrow tracking on every upvalue read — critical for the
upvalue_get hot path.
Implementations§
Source§impl LuaLClosure
impl LuaLClosure
Trait Implementations§
Source§impl Debug for LuaLClosure
impl Debug for LuaLClosure
Auto Trait Implementations§
impl Freeze for LuaLClosure
impl !RefUnwindSafe for LuaLClosure
impl !Send for LuaLClosure
impl !Sync for LuaLClosure
impl Unpin for LuaLClosure
impl UnsafeUnpin for LuaLClosure
impl !UnwindSafe for LuaLClosure
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