Pointer [Src] [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.
struct ref Pointer[A: A]
Constructors
create [Src]
A null pointer.
new ref create()
: Pointer[A] ref^
Returns
- Pointer[A] ref^
Public Functions
usize [Src]
Convert the pointer into an integer.
fun tag usize()
: USize val
Returns
- USize val
is_null [Src]
Return true for a null pointer, false for anything else.
fun tag is_null()
: Bool val
Returns
- Bool val
eq [Src]
Return true if this address is that address.
fun tag eq(
that: Pointer[A] tag)
: Bool val
Parameters
- that: Pointer[A] tag
Returns
- Bool val
lt [Src]
Return true if this address is less than that address.
fun tag lt(
that: Pointer[A] tag)
: Bool val
Parameters
- that: Pointer[A] tag
Returns
- Bool val
ne [Src]
fun tag ne(
that: Pointer[A] tag)
: Bool val
Parameters
- that: Pointer[A] tag
Returns
- Bool val
le [Src]
fun tag le(
that: Pointer[A] tag)
: Bool val
Parameters
- that: Pointer[A] tag
Returns
- Bool val
ge [Src]
fun tag ge(
that: Pointer[A] tag)
: Bool val
Parameters
- that: Pointer[A] tag
Returns
- Bool val
gt [Src]
fun tag gt(
that: Pointer[A] tag)
: Bool val
Parameters
- that: Pointer[A] tag
Returns
- Bool val
hash [Src]
Returns a hash of the address.
fun tag hash()
: U64 val
Returns
- U64 val