Category

Metatables

Metatables, metafields, and namecall methods.

Category guide

Overview

Use this overview to understand the category before opening a specific function.
  • See what this group of functions is meant to solve.
  • Compare function names and descriptions in one table.
  • Open a function for syntax, arguments, returns, and examples.

Metatables

Available functions

11 functions
FunctionDescription
getmetafieldReturns a raw metafield value from the target metatable.
getnamecallmethodReturns the current namecall method string when one is available, otherwise nil.
getrawmetatableReturns the metatable currently attached to a target value, or nil when none is present.
hasmetafieldReturns whether the target value has a non-nil raw metafield with the requested name.
hasmetatableReturns whether the target value has a metatable.
isreadonlyReturns whether a table is readonly.
makereadonlyMarks a table as readonly and returns no values.
makewriteableMarks a table as writable and returns no values.
setnamecallmethodReplaces the current namecall method string when a current namecall method exists.
setrawmetatableSets the metatable for a target value and returns the original target.
setreadonlySets whether a table is readonly and returns no values.