unregister static method
A static hook for the DI system to properly dispose of the service upon unregistering.
Implementation
static Resolvable<Unit> unregister(Result<ServiceMixin> serviceResult) {
return switch (serviceResult) {
Ok(value: final service) => service.dispose(),
Err() => syncUnit(),
};
}