TableToBuffer
Contains functions exposed to users of this library
Functions
GetSerializerForTable
TableToBuffer.
GetSerializerForTable
(
t:
T
--
The table to make a binary serializer for
) →
Serializer
<
T
>
--
A serializer that can make the given table into a buffer
Automatically creates a binary serializer for a given table. Only string-keyed tables are allowed.
Errors
Type | Description |
---|---|
"This function only accepts tables" when argument t is not a table | |
"Only maps of { [string]: boolean | number | string | table | vector (Vector3) | buffer } are supported. Mixed tables are not supported, neither are arrays." When the given map contains keys that are not only strings or contains non-primitive data types as values. |
TableAsBuffer
TableToBuffer.
TableAsBuffer
(
tbl:
T
--
The table to represent as a buffer.
) →
T
--
A table with its __index metatable modified so that indexes access the buffer to write and read data.
Generates a buffer for a given table. This will cause the table to be just a metatable into the buffer. Making all the data inside the buffer, and the table just a way to mutate it.
Errors
Type | Description |
---|---|
"This function does not support arrays or mixed tables." | The table can only contain strings. |
GetDeserializerBuilder
TableToBuffer.
GetDeserializerBuilder
(
) →
SerializerBuilder
--
A builder that allows you to create a Serializable using a builder-style API
Gets a Serializer/Deserializer builder.