Skip to content

API Reference / @gtkx/runtime / Field

Type Alias: Field ​

Field = object

Defined in: packages/runtime/dist/field.d.ts:6

A field of a native struct at a fixed offset, bound once against the descriptor its bytes are marshalled through, so the descriptor is not parsed again on access.

Properties ​

read ​

read: (handle) => unknown

Defined in: packages/runtime/dist/field.d.ts:8

Reads and decodes the field out of handle's memory.

Parameters ​

handle ​

ExternalObject<Handle>

Returns ​

unknown


write ​

write: (handle, value) => void

Defined in: packages/runtime/dist/field.d.ts:10

Encodes value and writes it into the field of handle's memory.

Parameters ​

handle ​

ExternalObject<Handle>

value ​

unknown

Returns ​

void