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§
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