This is the constructor
of the Struct type that gets returned.
Invoke it with new
to create a new Buffer instance backing the struct.
Pass it an existing Buffer instance to use that as the backing buffer.
Pass in an Object containing the struct fields to auto-populate the
struct with the data.
Pass it an existing Buffer instance to use that as the backing buffer.
any
any
Pass it an existing Buffer instance to use that as the backing buffer.
any
any
The alignment of this datatype when placed inside a struct.
{ type: "ref".Type; }
The current level of indirection of the buffer.
The name to use during debugging for this datatype.
The size in bytes required to hold this datatype.
Adds a new field to the struct instance with the given name and type. Note that this function will throw an Error if any instances of the struct type have already been created, therefore this function must be called at the beginning, before any instances are created.
Adds a new field to the struct instance with the given name and type. Note that this function will throw an Error if any instances of the struct type have already been created, therefore this function must be called at the beginning, before any instances are created.
To invoke when ref.get
is invoked on a buffer of this type.
any
To invoke when ref.set
is invoked on a buffer of this type.
Custom for struct type instances.
string