Skip to content

API Reference / @gtkx/runtime / write

Function: write()

write(handle, fieldDescriptor, offset, value): unknown

Defined in: packages/native/index.d.ts:354

Encodes value with fieldDescriptor and writes it into the handle's memory at offset bytes, rejecting a handle that points at nothing rather than writing at the bare offset.

The descriptor is compiled on every call. A field written repeatedly through the same descriptor and offset is cheaper through bindField, which compiles both once.

Parameters

handle

ExternalObject<Handle>

fieldDescriptor

Descriptor

offset

number

value

unknown

Returns

unknown

Released under the MPL-2.0 License.