← Standard library

opaque

struct opaque

Available without an import.

A host-owned token that Wax carries without inspecting its payload. Identity is minted per crossing: passing the same host pointer twice can produce unequal tokens. Text, equality, and hashing use the token identity, never the host address. Recorded identities replay, but a replayed host payload must not be dereferenced as a live pointer.

Opaque.wax:35

Members

GetIdmethod

public fn GetId() : int64

Returns the token's minted identity as a signed 64-bit value. It is not the host payload.

Opaque.wax:41

GetHashCodemethod

public fn GetHashCode() : uint32

Hashes the token identity; it does not hash host memory.

Opaque.wax:45

ToStringmethod

public fn ToString() : string

Formats opaque# followed by the unsigned identity, without exposing the payload.

Opaque.wax:57

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Appends the redacted identity form and returns the number of bytes appended.

Opaque.wax:65

Equalsmethod

public fn Equals(opaque other) : bool

Compares token identities. Separate crossings of one host value need not compare equal.

Opaque.wax:74

constructorconstructor

public constructor ()

Provided by the compiler.