Trait drying_paint::WatcherInit
source · 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)
Object Safety§
This trait is not object safe.