PriorityHap.scopedRegister

ScopedRegistrationOf!Reg scopedRegister(Handler handler, int priority) @safe

Register a delegate handler with the given priority and return an RAII handle that detaches automatically at scope exit.

Parameters

handlerDelegate handler to register.
priorityLower values run first.

Returns

A scoped registration owning the registration.
ScopedRegistrationOf!Reg scopedRegister(FunctionHandler handler, int priority) @safe

Register a free-function handler with the given priority and return an RAII handle that detaches automatically at scope exit.

Parameters

handlerFree-function handler to register.
priorityLower values run first.

Returns

A scoped registration owning the registration.