pub trait SubscriberList: Send + Sync {
// Required methods
fn add(&self, subscriber: ReactiveContext);
fn remove(&self, subscriber: &ReactiveContext);
fn visit(&self, f: &mut dyn FnMut(&ReactiveContext));
}
Expand description
A list of subscribers that can be notified when the value changes. This is used to track when the value changes and notify subscribers.
Required Methods§
Sourcefn add(&self, subscriber: ReactiveContext)
fn add(&self, subscriber: ReactiveContext)
Add a subscriber to the list.
Sourcefn remove(&self, subscriber: &ReactiveContext)
fn remove(&self, subscriber: &ReactiveContext)
Remove a subscriber from the list.
Sourcefn visit(&self, f: &mut dyn FnMut(&ReactiveContext))
fn visit(&self, f: &mut dyn FnMut(&ReactiveContext))
Visit all subscribers in the list.