pub trait AddListener<T> {
// Required method
fn add_listener(&self, f: T) -> Subscription;
}Required Methods§
Sourcefn add_listener(&self, f: T) -> Subscription
fn add_listener(&self, f: T) -> Subscription
Register a listener to this PubSub<_>, which will be automatically
deregistered when the return Subscription is dropped.
§Arguments
fThe callback, presumably a function-like type.