Skip to main content

Module userdata

Module userdata 

Source
Expand description

Userdata objects. In luna the only userdata are io file handles (there is no C API exposing arbitrary host objects), so a userdata wraps a file/stream handle plus an optional metatable — the shared FILE* metatable attached by the io library. Full io handle methods (read/write/seek/…) land with the io file model; this is the GC-level object + identity.

Structs§

Userdata
A Lua userdata object — a GC-managed handle wrapping a host-side payload (an io file handle, a newproxy identity token, or an embedder-supplied Rust value) plus an optional metatable.

Enums§

FileHandle
The OS resource behind a file userdata. Standard streams cannot be closed; an opened file carries its handle and becomes Closed after :close().
UserdataPayload
A userdata’s host-side payload. Beyond io file handles luna exposes: