PriorityHap.registerOneShot

OneShotRegistrationOf!Reg registerOneShot(Handler handler, int priority) @safe

Register a delegate handler with the given priority that detaches itself after the first invocation.

Parameters

handlerDelegate handler that runs at most once.
priorityLower values run first.

Returns

An OneShotRegistration for cancelling the one-shot.
OneShotRegistrationOf!Reg registerOneShot(FunctionHandler handler, int priority) @safe

Register a free-function handler with the given priority that detaches itself after the first invocation.

Parameters

handlerFree-function handler that runs at most once.
priorityLower values run first.

Returns

An OneShotRegistration for cancelling the one-shot.