RegistrationBag.add

void add(Handler)(ref Registration!Handler reg) @safe

Add a Registration to this bag.

The bag takes ownership of the registration's detach responsibility. The passed-in registration is moved from and becomes inert.

Parameters

regThe registration to add. Moved from after this call.
void add(Handler)(ref ScopedRegistration!Handler scoped) @safe nothrow

Add a ScopedRegistration to this bag.

The bag takes ownership of the scoped registration's detach responsibility. The passed-in scoped registration is released (not detached) and becomes inert.

Parameters

scopedThe scoped registration to add. Released after this call.