1 2 3 4 5 6 7 8 9 10 11 12 13 14
use crate::{DynWatcher, Watcher}; pub trait WatcherExt { fn into_dyn_watcher(self) -> DynWatcher; } impl<T> WatcherExt for T where T: Watcher + Send + 'static, { fn into_dyn_watcher(self) -> DynWatcher { Box::new(self) } }