pub struct LuaUserDataImpl {
pub len: usize,
pub nuvalue: u16,
pub metatable: Option<()>,
pub uv: Vec<()>,
pub data: Box<[u8]>,
}Expand description
Full userdata: a GC-tracked object carrying a raw byte payload plus optional Lua user values and an optional metatable.
§C mapping (types.tsv)
Udata → LuaUserData
Udata.len → len: usize
Udata.nuvalue → nuvalue: u16 (covered by uv.len() but kept for parity)
Udata.metatable → metatable: Option<GcRef<LuaTable>>
Udata.uv → uv: Vec<LuaValue>
(no direct C field) data: Box<[u8]> — the raw byte payload; C used a flexible
array member laid out past the Udata header via
`udatamemoffset` alignment math.Fields§
§len: usize§nuvalue: u16§metatable: Option<()>§uv: Vec<()>§data: Box<[u8]>Trait Implementations§
Source§impl Trace for LuaUserDataImpl
Phase-B internal userdata. Both metatable and uv are currently
Option<()> / Vec<()> stubs — no GC edges to walk yet. Becomes
real when userdata machinery lands post-D-1.
impl Trace for LuaUserDataImpl
Phase-B internal userdata. Both metatable and uv are currently
Option<()> / Vec<()> stubs — no GC edges to walk yet. Becomes
real when userdata machinery lands post-D-1.
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Concrete Rust type name for diagnostic/testC telemetry
(
Heap::type_name_count). Collector behavior must not branch on
this. The default covers container blanket impls, which are never
GC-boxed directly; concrete runtime types override it with
std::any::type_name::<Self>().fn trace(&self, _m: &mut Marker)
Auto Trait Implementations§
impl Freeze for LuaUserDataImpl
impl RefUnwindSafe for LuaUserDataImpl
impl Send for LuaUserDataImpl
impl Sync for LuaUserDataImpl
impl Unpin for LuaUserDataImpl
impl UnsafeUnpin for LuaUserDataImpl
impl UnwindSafe for LuaUserDataImpl
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