Skip to main content
class Deno.UnsafePointer
Unstable

A collection of static functions for interacting with pointer objects.

Static Methods

create<T = unknown>(value: number | bigint): PointerValue<T>

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

equals<T = unknown>(a: PointerValue<T>, b: PointerValue<T>): boolean

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

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

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

offset<T = unknown>(value: PointerObject, offset: number): PointerValue<T>

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

value(value: PointerValue): number | bigint

Get the numeric value of a pointer

Static Methods

create<T = unknown>(value: number | bigint): PointerValue<T>

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

equals<T = unknown>(a: PointerValue<T>, b: PointerValue<T>): boolean

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

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

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

offset<T = unknown>(value: PointerObject, offset: number): PointerValue<T>

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

value(value: PointerValue): number | bigint

Get the numeric value of a pointer