← Standard library

StableRef

struct StableRef<C> where C is class
import StableRef from Wax;

A class identity carried by value for recording queries, not an owning object reference. Meaningful only with its originating recording/build. Implicit conversion from a class value preserves its stable identity. Resolution uses the current query cursor, so an object can be absent at another frame. A default reference has id zero and resolves to null.

StableRef.wax:40

Members

Ofmethod

public static fn Of(C value) : StableRef<C>

Captures the identity of a class object. Panics for objects created only by the query image or invocation, because they do not belong to the recorded application timeline.

StableRef.wax:72

FromValuemethod

public static fn FromValue(C? value) : StableRef<C>?

Captures a nullable class identity: null remains null; a present value follows Of, including its rejection of query-local objects.

StableRef.wax:91

idgetter

public get id() : uint64

The packed identity reported by recording inspection and accepted by @ query arguments. Zero is the default sentinel naming no object.

StableRef.wax:102

GetHashCodemethod

public fn GetHashCode() : uint32

Hashes the packed identity without resolving or retaining the object.

StableRef.wax:114

Equalsmethod

public fn Equals(StableRef<C> other) : bool

Compares packed identities without examining object contents.

StableRef.wax:121

Resolvemethod

public fn Resolve() : C?

Resolves at the current query cursor, returning null when the object is absent, query-local, or incompatible with the requested class. Panics outside an active query invocation.

StableRef.wax:149

ToStringmethod

public fn ToString() : string

Provided by the compiler.

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Provided by the compiler.

constructorconstructor

public constructor ()

Provided by the compiler.