Module

Data.ArrayBuffer.DataView

Package
purescript-arraybuffer
Repository
purescript-contrib/purescript-arraybuffer

This module represents the functional bindings to JavaScript's DataView objects. See MDN's spec for details.

#Endian Source

data Endian

Endianness of a multi-byte type. Little-Endian or Big-Endian.

Constructors

Instances

#buffer Source

buffer :: DataView -> ArrayBuffer

ArrayBuffer being mapped by the view.

#byteLength Source

byteLength :: DataView -> ByteLength

Represents the length of this view.

#byteOffset Source

byteOffset :: DataView -> ByteOffset

Represents the offset of this view from the start of its ArrayBuffer.

#get Source

get :: forall a name t. BinaryValue a t => BytesPerType a => ShowArrayViewType a name => IsSymbol name => Endian -> Proxy a -> DataView -> ByteOffset -> Effect (Maybe t)

#getBE Source

getBE :: forall a name t. BinaryValue a t => BytesPerType a => ShowArrayViewType a name => IsSymbol name => Proxy a -> DataView -> ByteOffset -> Effect (Maybe t)

#getFloat32be Source

getFloat32be :: DataView -> ByteOffset -> Effect (Maybe Float32)

Fetch big-endian float32 value at a certain index in a DataView.

#getFloat32le Source

getFloat32le :: DataView -> ByteOffset -> Effect (Maybe Float32)

Fetch little-endian float32 value at a certain index in a DataView.

#getFloat64be Source

getFloat64be :: DataView -> ByteOffset -> Effect (Maybe Number)

Fetch big-endian float64 value at a certain index in a DataView.

#getFloat64le Source

getFloat64le :: DataView -> ByteOffset -> Effect (Maybe Number)

Fetch little-endian float64 value at a certain index in a DataView.

#getInt16be Source

getInt16be :: DataView -> ByteOffset -> Effect (Maybe Int)

Fetch big-endian int16 value at a certain index in a DataView.

#getInt16le Source

getInt16le :: DataView -> ByteOffset -> Effect (Maybe Int)

Fetch little-endian int16 value at a certain index in a DataView.

#getInt32be Source

getInt32be :: DataView -> ByteOffset -> Effect (Maybe Int)

Fetch big-endian int32 value at a certain index in a DataView.

#getInt32le Source

getInt32le :: DataView -> ByteOffset -> Effect (Maybe Int)

Fetch little-endian int32 value at a certain index in a DataView.

#getInt8 Source

getInt8 :: DataView -> ByteOffset -> Effect (Maybe Int)

Fetch int8 value at a certain index in a DataView.

#getLE Source

getLE :: forall a name t. BinaryValue a t => BytesPerType a => ShowArrayViewType a name => IsSymbol name => Proxy a -> DataView -> ByteOffset -> Effect (Maybe t)

#getUint16be Source

getUint16be :: DataView -> ByteOffset -> Effect (Maybe UInt)

Fetch big-endian uint16 value at a certain index in a DataView.

#getUint16le Source

getUint16le :: DataView -> ByteOffset -> Effect (Maybe UInt)

Fetch little-endian uint16 value at a certain index in a DataView.

#getUint32be Source

getUint32be :: DataView -> ByteOffset -> Effect (Maybe UInt)

Fetch big-endian uint32 value at a certain index in a DataView.

#getUint32le Source

getUint32le :: DataView -> ByteOffset -> Effect (Maybe UInt)

Fetch little-endian uint32 value at a certain index in a DataView.

#getUint8 Source

getUint8 :: DataView -> ByteOffset -> Effect (Maybe UInt)

Fetch uint8 value at a certain index in a DataView.

#part Source

part :: ArrayBuffer -> ByteOffset -> ByteLength -> Effect DataView

View mapping a region of the ArrayBuffer.

#remainder Source

remainder :: ArrayBuffer -> ByteOffset -> Effect DataView

View mapping the rest of an ArrayBuffer after an index.

#set Source

set :: forall a name t. BinaryValue a t => BytesPerType a => ShowArrayViewType a name => IsSymbol name => Endian -> Proxy a -> DataView -> ByteOffset -> t -> Effect Boolean

#setBE Source

setBE :: forall a name t. BinaryValue a t => BytesPerType a => ShowArrayViewType a name => IsSymbol name => Proxy a -> DataView -> ByteOffset -> t -> Effect Boolean

Store big-endian value at a certain index in a DataView.

#setFloat32be Source

setFloat32be :: DataView -> ByteOffset -> Float32 -> Effect Boolean

Store big-endian float32 value at a certain index in a DataView.

#setFloat32le Source

setFloat32le :: DataView -> ByteOffset -> Float32 -> Effect Boolean

Store little-endian float32 value at a certain index in a DataView.

#setFloat64be Source

setFloat64be :: DataView -> ByteOffset -> Number -> Effect Boolean

Store big-endian float64 value at a certain index in a DataView.

#setFloat64le Source

setFloat64le :: DataView -> ByteOffset -> Number -> Effect Boolean

Store little-endian float64 value at a certain index in a DataView.

#setInt16be Source

setInt16be :: DataView -> ByteOffset -> Int -> Effect Boolean

Store big-endian int16 value at a certain index in a DataView.

#setInt16le Source

setInt16le :: DataView -> ByteOffset -> Int -> Effect Boolean

Store little-endian int16 value at a certain index in a DataView.

#setInt32be Source

setInt32be :: DataView -> ByteOffset -> Int -> Effect Boolean

Store big-endian int32 value at a certain index in a DataView.

#setInt32le Source

setInt32le :: DataView -> ByteOffset -> Int -> Effect Boolean

Store little-endian int32 value at a certain index in a DataView.

#setInt8 Source

setInt8 :: DataView -> ByteOffset -> Int -> Effect Boolean

Store int8 value at a certain index in a DataView.

#setLE Source

setLE :: forall a name t. BinaryValue a t => BytesPerType a => ShowArrayViewType a name => IsSymbol name => Proxy a -> DataView -> ByteOffset -> t -> Effect Boolean

Store little-endian value at a certain index in a DataView.

#setUint16be Source

setUint16be :: DataView -> ByteOffset -> UInt -> Effect Boolean

Store big-endian uint16 value at a certain index in a DataView.

#setUint16le Source

setUint16le :: DataView -> ByteOffset -> UInt -> Effect Boolean

Store little-endian uint16 value at a certain index in a DataView.

#setUint32be Source

setUint32be :: DataView -> ByteOffset -> UInt -> Effect Boolean

Store big-endian uint32 value at a certain index in a DataView.

#setUint32le Source

setUint32le :: DataView -> ByteOffset -> UInt -> Effect Boolean

Store little-endian uint32 value at a certain index in a DataView.

#setUint8 Source

setUint8 :: DataView -> ByteOffset -> UInt -> Effect Boolean

Store uint8 value at a certain index in a DataView.

#whole Source

whole :: ArrayBuffer -> DataView

View mapping the whole ArrayBuffer.