import { Deno } from "https://deno.land/x/deno@v1.28.0/cli/dts/lib.deno.unstable.d.ts";
const { UnsafePointerView } = Deno;
UNSTABLE: New API, yet to be vetted.
An unsafe pointer view to a memory location as specified by the pointer
value. The UnsafePointerView
API follows the standard built in interface
DataView
for accessing the underlying types at an memory
location (numbers, strings and raw bytes).
Constructors
Properties
Methods
Copies the memory of the pointer into a typed array.
Length is determined from the typed array's byteLength
.
Also takes optional byte offset from the pointer.
Gets an ArrayBuffer
of length byteLength
at the specified byte
offset from the pointer.
Gets a signed 64-bit integer at the specified byte offset from the pointer.
Gets an unsigned 64-bit integer at the specified byte offset from the pointer.
Gets a boolean at the specified byte offset from the pointer.
Gets a C string (null
terminated string) at the specified byte offset
from the pointer.
Gets a signed 32-bit float at the specified byte offset from the pointer.
Gets a signed 64-bit float at the specified byte offset from the pointer.
Gets a signed 16-bit integer at the specified byte offset from the pointer.
Gets a signed 32-bit integer at the specified byte offset from the pointer.
Gets a signed 8-bit integer at the specified byte offset from the pointer.
Gets an unsigned 16-bit integer at the specified byte offset from the pointer.
Gets an unsigned 32-bit integer at the specified byte offset from the pointer.
Gets an unsigned 8-bit integer at the specified byte offset from the pointer.
Static Methods
Copies the memory of the specified pointer into a typed array.
Length is determined from the typed array's byteLength
.
Also takes optional byte offset from the pointer.
Gets an ArrayBuffer
of length byteLength
at the specified byte
offset from the specified pointer.
Gets a C string (null
terminated string) at the specified byte offset
from the specified pointer.