Skip to main content

Module buffer

Module buffer 

Source
Expand description

Array buffer storage and typed-array views.

An ArrayBuffer owns its bytes; a SharedArrayBuffer’s bytes are an Arc of atomic bytes, allocated at the maximum length for a growable one, so agents on other threads share them in safe Rust and Atomics operates on them directly. A typed array or DataView is a View over a buffer object held in its internal slot 0.

Structs§

Buffer
An ArrayBuffer or SharedArrayBuffer record.
SharedBytes
The bytes of a shared buffer, which other agents may hold too.
View
A typed array’s or a DataView’s window on its buffer.

Enums§

ElementKind
A typed array’s element type.
Store
Where a buffer’s bytes are.

Constants§

MAX_BUFFER_LENGTH
QuickJS’s limit on a buffer’s length (INT32_MAX).