Value

Represents a Lua value

Constructors

this
this(long v)

Construct a new Value

this
this(int v)

Construct a new Value

this
this(bool v)

Construct a new Value

this
this(double v)

Construct a new Value

this
this(string v)

Construct a new Value

this
this(TableValue v)

Construct a new Value

this
this(UserdataValue v)

Construct a new Value

this
this(FunctionValue v)

Construct a new Value

this
this(ThreadValue v)

Construct a new Value

this
this(Value* v)

Construct a new heap Value

Members

Functions

call
Value[] call(Value[] args)

Call this value

equals
bool equals(Value b)

Check if this equals that, invoking any necessary metamethods

get
Value get(Value key)

Get a key

isNil
bool isNil()

Check if this Value is nil

length
Value length()

Get the length of this value

lessOrEqual
bool lessOrEqual(Value b)

Check if this is less than or equal to that

lessThan
bool lessThan(Value b)

Check if this is less than that

luaToString
Value luaToString()

Convert to a Lua "string"

metacall
Nullable!(Value[]) metacall(string method, Value[] args)

Call a metamethod on this value

metatable
TableValue metatable()

Get the metatable of this value, or null if N/A

opEquals
bool opEquals(Value other)
Undocumented in source. Be warned that the author may not have intended to support it.
set
void set(Value key, Value value)

Set a key

toBool
bool toBool()

Convert this value to a bool

toHash
size_t toHash()
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
typeStr
string typeStr(Value o)

Return a string describing both these objects' types

typeStr
string typeStr()

Return a string describing this object's type

Static functions

from
Value from(Value[] arr)

Convert a tuple to a single value

makeTuple
Value makeTuple(Value[] v)

Construct a new tuple Value.

rawTupleUnsafe
Value rawTupleUnsafe(Value[] v)

Construct a new tuple Value, without flattening the tuple whatsoever.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

type
ValueType type;

The type of this Value

Meta