pub struct Watcher { /* private fields */ }Expand description
File watcher for configuration hot reload 配置热重载的文件监视器
Equivalent to Spring Cloud Config’s watch functionality. 等价于Spring Cloud Config的watch功能。
Implementations§
Source§impl Watcher
impl Watcher
Sourcepub fn watch_file(&self, path: PathBuf)
pub fn watch_file(&self, path: PathBuf)
Add a file to watch 添加要监视的文件
Sourcepub fn start(&self) -> ConfigResult<()>
pub fn start(&self) -> ConfigResult<()>
Start watching 开始监视
Auto Trait Implementations§
impl Freeze for Watcher
impl RefUnwindSafe for Watcher
impl Send for Watcher
impl Sync for Watcher
impl Unpin for Watcher
impl UnsafeUnpin for Watcher
impl UnwindSafe for Watcher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more