import { Deno } from "https://deno.land/x/deno@v1.36.0/cli/tsc/dts/lib.deno.unstable.d.ts";
const { UnsafePointer } = Deno;
UNSTABLE: New API, yet to be vetted.
An unsafe pointer to a memory location for passing and returning pointers to and from the FFI.
Static Methods
create(value: number | bigint): PointerValue
Create a pointer from a numeric value. This one is really dangerous!
equals(a: PointerValue, b: PointerValue): boolean
Returns true
if the two pointers point to the same address.
of(value: Deno.UnsafeCallback | BufferSource): PointerValue
Return the direct memory pointer to the typed array in memory.
offset(value: NonNullable<PointerValue>, offset: number): PointerValue
Return a new pointer offset from the original by offset
bytes.
value(value: PointerValue): number | bigint
Get the numeric value of a pointer