NothrowHap.register

Registration!Handler register(Handler handler) @safe nothrow

Register a nothrow delegate handler and return a detachable registration.

Unlike attach, register returns a Registration that can detach exactly the registered handler by identity, even when the same handler was registered multiple times.

Parameters

handlerDelegate handler to register; null returns an inert registration.

Returns

A Registration that can detach this exact registered handler.
Registration!Handler register(FunctionHandler handler) @safe nothrow

Register a nothrow free-function handler and return a detachable registration.

Parameters

handlerFree-function handler to register; null returns an inert registration.

Returns

A Registration that can detach this exact registered handler.