amber/web/array_buffer

Types

Represents a raw buffer of binary data, which is used to store data for the different typed arrays. ArrayBuffers cannot be read from or written to directly, but can be passed to a typed array or DataView Object to interpret the raw buffer as needed.

pub type ArrayBuffer

Functions

pub fn byte_length(array_buffer: ArrayBuffer) -> Int

The length of the ArrayBuffer (in bytes).

pub fn new(byte_length: Int) -> ArrayBuffer
pub fn slice(
  array_buffer: ArrayBuffer,
  begin: Int,
) -> ArrayBuffer
pub fn slice_with_end(
  array_buffer: ArrayBuffer,
  begin: Int,
  end: Int,
) -> ArrayBuffer
Search Document