Skip to main content

Interface: AllocatedStruct

What allocStruct hands back.

Properties

arrays

arrays: Record<string, Uint8Array>

The element buffer allocated for each field named in AllocStructOptions.lengths — the very memory the struct points at, not a copy.


bytes

bytes: Uint8Array

Zeroed struct bytes, with the address and count of every requested array field already written. Pass them where C wants a struct foo *, then StructDef.unpack them to read the result.