pub struct RegistryWatcher { /* private fields */ }Expand description
Tracks the last-seen registry version and detects changes.
Create a watcher from RegistryReader::watch
or directly with RegistryWatcher::new. Call changed
with the current registry version to check for updates.
Implementations§
Source§impl RegistryWatcher
impl RegistryWatcher
Sourcepub fn changed(&self, current_version: u64) -> bool
pub fn changed(&self, current_version: u64) -> bool
Check whether the registry has changed since the last acknowledgement.
Sourcepub fn acknowledge(&mut self, current_version: u64)
pub fn acknowledge(&mut self, current_version: u64)
Acknowledge the current version, resetting the change flag.
Sourcepub fn last_seen_version(&self) -> u64
pub fn last_seen_version(&self) -> u64
Return the last acknowledged version.
Auto Trait Implementations§
impl Freeze for RegistryWatcher
impl RefUnwindSafe for RegistryWatcher
impl Send for RegistryWatcher
impl Sync for RegistryWatcher
impl Unpin for RegistryWatcher
impl UnwindSafe for RegistryWatcher
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