Lua.VM.Display.Userdata (Lua v1.0.0-rc.2)
View SourceDisplay wrapper for a Lua userdata reference ({:udref, id})
returned across the Lua.eval!/2 boundary in
decode: false mode.
Default decode: true returns {:userdata, term} and is unaffected
by this wrap.
Fields
:id— the integer id of the underlying{:udref, id}reference.:term— the wrapped Elixir term, looked up at the time the eval boundary was crossed.:ref— the original{:udref, id}tuple so callers can round-trip the value back into the VM (viaLua.set!/3,Lua.encode!/2, etc.).
Internal pattern matches against {:udref, _} are unaffected; the
wrap is a display affordance applied at the eval boundary only.
Summary
Types
@type t() :: %Lua.VM.Display.Userdata{ id: non_neg_integer(), ref: tuple(), term: term() }