pub struct ConfigWatcher { /* private fields */ }Expand description
Watch a configuration file for changes
Implementations§
Source§impl ConfigWatcher
impl ConfigWatcher
Sourcepub fn new(
config_path: impl AsRef<Path>,
current_config: ServerFileConfig,
) -> Result<Self>
pub fn new( config_path: impl AsRef<Path>, current_config: ServerFileConfig, ) -> Result<Self>
Create a new config watcher for the given file
Sourcepub async fn recv(&mut self) -> Option<ConfigChange>
pub async fn recv(&mut self) -> Option<ConfigChange>
Receive the next configuration change
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