array

package
v0.0.0-...-5b96247 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer js.Value

Buffer is a JS ArrayBuffer.

func CreateBufferFromSlice

func CreateBufferFromSlice(s interface{}) (Buffer, error)

CreateBufferFromSlice copies and creates a read only Buffer buffer.

func NewBuffer

func NewBuffer(size int) Buffer

NewBuffer creates a new JS byte buffer.

func (Buffer) BigInt64Array

func (a Buffer) BigInt64Array() TypedArray

BigInt64Array view over the array.

func (Buffer) BigUint64Array

func (a Buffer) BigUint64Array() TypedArray

BigUint64Array view over the array.

func (Buffer) ByteLength

func (a Buffer) ByteLength() int

ByteLength returns the length of byte array.

func (Buffer) CopyBytes

func (a Buffer) CopyBytes() ([]byte, error)

CopyBytes copies out bytes from js array buffer.

func (Buffer) Float32Array

func (a Buffer) Float32Array() TypedArray

Float32Array view over the array buffer.

func (Buffer) Float64Array

func (a Buffer) Float64Array() TypedArray

Float64Array view over the array buffer.

func (Buffer) Int16Array

func (a Buffer) Int16Array() TypedArray

Int16Array view over the array.

func (Buffer) Int32Array

func (a Buffer) Int32Array() TypedArray

Int32Array view over the array.

func (Buffer) Int8Array

func (a Buffer) Int8Array() TypedArray

Int8Array view over the array.

func (Buffer) JSValue

func (a Buffer) JSValue() js.Value

JSValue returns JS value for a.

func (Buffer) Uint16Array

func (a Buffer) Uint16Array() TypedArray

Uint16Array view over the array buffer.

func (Buffer) Uint32Array

func (a Buffer) Uint32Array() TypedArray

Uint32Array view over the array buffer.

func (Buffer) Uint8Array

func (a Buffer) Uint8Array() TypedArray

Uint8Array view over the array buffer.

func (Buffer) Write

func (a Buffer) Write(p []byte) (n int, err error)

Write bytes into array.

type TypedArray

type TypedArray js.Value

TypedArray is a JS wrapper for typed array.

func CreateTypedArrayFromSlice

func CreateTypedArrayFromSlice(s interface{}) (TypedArray, error)

CreateTypedArrayFromSlice copies and creates a read only ArrayBuffer buffer.

func Must

func Must(arr TypedArray, err error) TypedArray

Must panics on error.

func (TypedArray) Buffer

func (a TypedArray) Buffer() js.Value

Buffer returns the underlying ArrayBuffer.

func (TypedArray) ByteLength

func (a TypedArray) ByteLength() int

ByteLength returns the length of underlying data.

func (TypedArray) CopyBytes

func (a TypedArray) CopyBytes() ([]byte, error)

CopyBytes copies out bytes from js typed array.

func (TypedArray) JSValue

func (a TypedArray) JSValue() js.Value

JSValue returns the underlying js value.

func (TypedArray) Type

func (a TypedArray) Type() string

Type returns the type of buffer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL