LuaState.wrap

Wrap a D value in a Lua reference.

Note that using this method is only necessary in certain situations, such as when you want to act on the reference before fully exposing it to Lua.

class LuaState
@trusted
T
wrap
(
U
)
()
if (
is(T : LuaObject) ||
)

Parameters

T

type of reference. Must be LuaObject, LuaTable, LuaFunction or LuaDynamic. Defaults to LuaObject.

value U

D value to wrap

Return Value

Type: T

A Lua reference to value

Meta