Deno.UnsafePointer

UNSTABLE: New API, yet to be vetted.

A collection of static functions for interacting with pointer objects.

class UnsafePointer {
static create<T = unknown>(value: number | bigint): PointerValue<T>;
static equals<T = unknown>(a: PointerValue<T>, b: PointerValue<T>): boolean;
static of<T = unknown>(value: Deno.UnsafeCallback | BufferSource): PointerValue<T>;
static offset<T = unknown>(value: PointerObject, offset: number): PointerValue<T>;
static value(value: PointerValue): number | bigint;
}

§Static Methods

§
create<T = unknown>(value: number | bigint): PointerValue<T>
[src]

Create a pointer from a numeric value. This one is really dangerous!

§
equals<T = unknown>(a: PointerValue<T>, b: PointerValue<T>): boolean
[src]

Returns true if the two pointers point to the same address.

§
of<T = unknown>(value: Deno.UnsafeCallback | BufferSource): PointerValue<T>
[src]

Return the direct memory pointer to the typed array in memory.

§
offset<T = unknown>(value: PointerObject, offset: number): PointerValue<T>
[src]

Return a new pointer offset from the original by offset bytes.

§
value(value: PointerValue): number | bigint
[src]

Get the numeric value of a pointer