#[non_exhaustive]pub enum MetaMethod {
Show 19 variants
Add,
Sub,
Mul,
Div,
Mod,
Pow,
Unm,
IDiv,
Concat,
Len,
Eq,
Lt,
Le,
Index,
NewIndex,
Call,
ToString,
Iter,
Type,
}Expand description
Kinds of metamethods that can be overridden on userdata.
Mirrors mlua::MetaMethod. The variant set is the Luau-relevant subset
(bitwise operators specific to Lua 5.3/5.4 are omitted; Luau does not use
them as metamethods).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Add
The + operator (__add).
Sub
The - operator (__sub).
Mul
The * operator (__mul).
Div
The / operator (__div).
Mod
The % operator (__mod).
Pow
The ^ operator (__pow).
Unm
The unary minus operator (__unm).
IDiv
The floor-division // operator (__idiv).
Concat
The string concatenation operator .. (__concat).
Len
The length operator # (__len).
Eq
The == operator (__eq).
Lt
The < operator (__lt).
Le
The <= operator (__le).
Index
Index access obj[key] (__index).
NewIndex
Index write access obj[key] = value (__newindex).
Call
The call operator obj(...) (__call).
ToString
The __tostring metamethod.
Iter
The __iter metamethod (Luau).
Type
The __type/__name metafield.