Pointer[A: A]¶
A Pointer[A] is a raw memory pointer. It has no descriptor and thus can't be included in a union or intersection, or be a subtype of any interface. Most functions on a Pointer[A] are private to maintain memory safety.
Constructors¶
create¶
A null pointer.
Returns¶
- Pointer[A] ref^
Public Functions¶
offset¶
Return a tag pointer to the n-th element.
Parameters¶
- n: USize val
Returns¶
- Pointer[A] tag
usize¶
Convert the pointer into an integer.
Returns¶
- USize val
is_null¶
Return true for a null pointer, false for anything else.
Returns¶
- Bool val
eq¶
Return true if this address is that address.
Parameters¶
- that: Pointer[A] tag
Returns¶
- Bool val
lt¶
Return true if this address is less than that address.
Parameters¶
- that: Pointer[A] tag
Returns¶
- Bool val
ne¶
Parameters¶
- that: Pointer[A] tag
Returns¶
- Bool val
le¶
Parameters¶
- that: Pointer[A] tag
Returns¶
- Bool val
ge¶
Parameters¶
- that: Pointer[A] tag
Returns¶
- Bool val
gt¶
Parameters¶
- that: Pointer[A] tag
Returns¶
- Bool val
hash¶
Returns a hash of the address.
Returns¶
- USize val
hash64¶
Returns a 64-bit hash of the address.
Returns¶
- U64 val