pub struct TableNode {
pub value: LuaValue,
pub key: LuaValue,
pub next: i32,
pub dead: bool,
}Expand description
One node in a table’s hash part.
signed offset into the same node vector.
Fields§
§value: LuaValueValue stored at this key. C: gval(n).
key: LuaValueKey stored in this node. C: n->u.key_val + n->u.key_tt.
next: i32Collision-chain offset (positive or negative; zero means end of chain).
dead: boolDead-key tombstone, mirroring C’s LUA_TDEADKEY (lgc.c clearkey).
Set by the GC traversal when this node’s value is nil: the key
object becomes collectible, so the key field may DANGLE from this
point on. Probes must never dereference a dead key — normal
get/set equality treats dead nodes as no-match (C: the tt check
fails), and only the next-position lookup matches them, by raw
pointer bits (C: equalkey with deadok). set_key resurrects
the node. Lives in the struct’s padding; size stays 40 bytes.
Auto Trait Implementations§
impl !RefUnwindSafe for TableNode
impl !Send for TableNode
impl !Sync for TableNode
impl !UnwindSafe for TableNode
impl Freeze for TableNode
impl Unpin for TableNode
impl UnsafeUnpin for TableNode
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