Function subscribe
Source pub fn subscribe(subscriber: impl Subscriber + 'static)
Expand description
Registers a subscriber for every event of this Worker instance (Rails’ Rails.event.subscribe).
Call it from the start event, which runs once per instance; a second
subscriber with the same name replaces the first.
§Examples
ocre::events::subscribe(Audit);