pub struct ConfigWatcher { /* private fields */ }Expand description
Notices when the configuration file changes, so a running rigtop can apply the edits without a restart.
Implementations§
Source§impl ConfigWatcher
impl ConfigWatcher
Sourcepub fn poll(&mut self) -> Option<Result<Config, ConfigError>>
pub fn poll(&mut self) -> Option<Result<Config, ConfigError>>
When the file changed since the previous call, its new contents (or
why they cannot be used, e.g. a file saved half-way). None when
unchanged, checked less than a second ago, or removed: a missing
file keeps the configuration in use rather than resetting it.
Auto Trait Implementations§
impl Freeze for ConfigWatcher
impl RefUnwindSafe for ConfigWatcher
impl Send for ConfigWatcher
impl Sync for ConfigWatcher
impl Unpin for ConfigWatcher
impl UnsafeUnpin for ConfigWatcher
impl UnwindSafe for ConfigWatcher
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