Boxed

A payload of type T wrapped in a class implementing the Sendable interface. Used to box values for sending via the message bus.

final
class Boxed : Sendable (
T
) {}

Constructors

this
this(T payload)

Constructor that adds a passed payload to the internal stored payload, creating a *shared* Boxed.

Members

Variables

payload
T payload;

Payload value embedded in this message.

Parameters

T

Type to embed into the Boxed as the type of the payload.