pub trait WatcherInit<'ctx, T: ?Sized, O: ?Sized = DefaultOwner> {
// Required methods
fn init_child<F, Ch>(&mut self, func: F)
where F: 'static + Clone + Fn(&mut T) -> &mut Ch,
Ch: Watcher<'ctx, O>;
fn watch<F>(&mut self, func: F)
where Self: WatcherInit<'static, T, DefaultOwner>,
F: 'static + Fn(&mut T);
fn watch_for_new_child<F, W>(&mut self, func: F)
where Self: WatcherInit<'static, T, DefaultOwner>,
F: 'static + Fn(&mut T) -> Option<W>,
W: 'static + WatcherHolder<'static, DefaultOwner>,
W::Content: Watcher<'static, DefaultOwner>;
fn watch_explicit<F>(&mut self, func: F)
where F: 'static + Fn(WatchArg<'_, 'ctx, O>, &mut T);
fn watch_for_new_child_explicit<F, W>(&mut self, func: F)
where F: 'static + Fn(WatchArg<'_, 'ctx, O>, &mut T) -> Option<W>,
W: 'ctx + WatcherHolder<'ctx, O>,
W::Content: Watcher<'ctx, O>;
}Required Methods§
fn init_child<F, Ch>(&mut self, func: F)
Sourcefn watch<F>(&mut self, func: F)
fn watch<F>(&mut self, func: F)
Use this to set up a function which should be re-run whenever watched values referenced inside change.
fn watch_for_new_child<F, W>(&mut self, func: F)where
Self: WatcherInit<'static, T, DefaultOwner>,
F: 'static + Fn(&mut T) -> Option<W>,
W: 'static + WatcherHolder<'static, DefaultOwner>,
W::Content: Watcher<'static, DefaultOwner>,
Sourcefn watch_explicit<F>(&mut self, func: F)
fn watch_explicit<F>(&mut self, func: F)
Use this to set up a function which should be re-run whenever watched values referenced inside change.
fn watch_for_new_child_explicit<F, W>(&mut self, func: F)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.