gossamer/array_buffer

Types

pub type ArrayBuffer

Values

pub fn byte_length(of array_buffer: ArrayBuffer) -> Int
pub fn is_detached(array_buffer: ArrayBuffer) -> Bool
pub fn is_resizable(array_buffer: ArrayBuffer) -> Bool
pub fn is_view(value: a) -> Bool
pub fn max_byte_length(of array_buffer: ArrayBuffer) -> Int
pub fn new(byte_length: Int) -> ArrayBuffer
pub fn new_resizable(
  byte_length: Int,
  max_byte_length max: Int,
) -> ArrayBuffer

Creates a resizable ArrayBuffer with the given initial byte length and maximum byte length.

pub fn resize(
  array_buffer: ArrayBuffer,
  to byte_length: Int,
) -> Result(Nil, String)

Resizes the ArrayBuffer to the specified byte length. The buffer must have been created with new_resizable. Returns an error if the new length exceeds the maximum byte length.

pub fn slice(
  array_buffer: ArrayBuffer,
  from begin: Int,
) -> ArrayBuffer
pub fn slice_with_end(
  array_buffer: ArrayBuffer,
  from begin: Int,
  to end: Int,
) -> ArrayBuffer
pub fn transfer(array_buffer: ArrayBuffer) -> ArrayBuffer
Search Document