Skip to main content

Module value

Module value 

Source
Expand description

The Lua value model.

Value mirrors the Lua types serpent can serialize: nil, booleans, numbers, strings, tables, functions, and named globals. Tables use reference-counted interior mutability so shared and cyclic graphs keep their identity across a serialize and deserialize round trip.

Structs§

Func
An opaque Lua function.
Global
A value referenced by a global name.
MetaError
An error raised by a __serialize or __tostring metamethod.
Table
A shared table handle.
TableData
The backing store for a table.

Enums§

Ident
A hashable identity for any value, used to track shared references.
Key
A table key. Only hashable Lua values can be keys.
Value
A Lua value.

Type Aliases§

MetaFn
A metamethod. Returns the replacement value, or a MetaError to model a metamethod that raises. The serializer treats an error as “the metamethod did not apply” and serializes the table as itself.