GuestBufferView

A wrapper around a TypedArray (e.g. Uint8Array), Buffer, or any view-like value which exposes an inner ArrayBuffer, offset, and length.

This wrapper can be used to easily interact with typed arrays and their inner array buffers. Use tryFrom to attempt wrapping a value without throwing an exception for invalid cases.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Returns the offset in the backing array buffer at which this view starts.

Link copied to clipboard

Returns the array buffer backing this view, as a GuestBytes wrapper. The returned value is validated and is guaranteed to contain buffer elements.

Link copied to clipboard
fun byteSize(): Int

Returns the size in bytes of this view.

Link copied to clipboard
operator fun component1(): GuestBytes
Link copied to clipboard
operator fun component2(): Int
Link copied to clipboard
operator fun component3(): Int