pub struct LuaUserDataImpl {
pub len: usize,
pub nuvalue: u16,
pub metatable: Option<()>,
pub uv: Vec<()>,
pub data: Box<[u8]>,
}Expand description
Corresponds to C’s Udata: a GC-tracked object carrying a raw byte
payload plus optional Lua user values and an optional metatable.
Never constructed: metatable/uv are still placeholder () types
rather than GcRef<LuaTable>/LuaValue, and no call site builds a
LuaUserDataImpl. The userdata type actually used throughout the VM is
lua_types::userdata::LuaUserData.
Fields§
§len: usize§nuvalue: u16§metatable: Option<()>§uv: Vec<()>§data: Box<[u8]>Trait Implementations§
Source§impl Trace for LuaUserDataImpl
metatable and uv are Option<()> / Vec<()> placeholders with no GC
edges to walk; full userdata is lua_types::value::LuaUserData instead.
impl Trace for LuaUserDataImpl
metatable and uv are Option<()> / Vec<()> placeholders with no GC
edges to walk; full userdata is lua_types::value::LuaUserData instead.
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