pub trait Monitor {
fn new(sender: Box<dyn Fn(MonitorMessage) + Send>) -> Self
where
Self: Sized;
fn set_config(&mut self, config: MonitorConfig);
fn reload(&mut self, path: &AbsPath);
}
Expand description
A trait to monitor a set of directories and files TODO: In the future it would be nice to do this with a Future (no pun intended).
Required Methods§
sourcefn new(sender: Box<dyn Fn(MonitorMessage) + Send>) -> Selfwhere
Self: Sized,
fn new(sender: Box<dyn Fn(MonitorMessage) + Send>) -> Selfwhere
Self: Sized,
Instantiates a new instance of Self
sourcefn set_config(&mut self, config: MonitorConfig)
fn set_config(&mut self, config: MonitorConfig)
Updates the configuration of things to monitor.