subscribeOnce


Description:

public Result<EventBus,Error> subscribeOnce (string topic, owned EventHandler handler)

Subscribes topic with one-shot handler.

Parameters:

topic

topic name.

handler

event handler.

Returns:

Result.ok(this bus), or Result.error(EventBusError.INVALID_ARGUMENT) when topic is empty.