pub struct ConfigWatcherHandle {
pub events: Receiver<Option<ConfigChangeEvent>>,
/* private fields */
}Expand description
Handle to control the config watcher.
Fields§
§events: Receiver<Option<ConfigChangeEvent>>Receiver for config change events. Cloning this receiver will allow multiple consumers to receive events.
Implementations§
Source§impl ConfigWatcherHandle
impl ConfigWatcherHandle
Sourcepub async fn wait_for_change(&mut self) -> Option<ConfigChangeEvent>
pub async fn wait_for_change(&mut self) -> Option<ConfigChangeEvent>
Wait for the next config change event.
Sourcepub fn has_pending_change(&self) -> bool
pub fn has_pending_change(&self) -> bool
Check if there’s a pending change without blocking.
Sourcepub fn latest_event(&self) -> Option<ConfigChangeEvent>
pub fn latest_event(&self) -> Option<ConfigChangeEvent>
Get the latest event without waiting.
Auto Trait Implementations§
impl Freeze for ConfigWatcherHandle
impl !RefUnwindSafe for ConfigWatcherHandle
impl Send for ConfigWatcherHandle
impl Sync for ConfigWatcherHandle
impl Unpin for ConfigWatcherHandle
impl !UnwindSafe for ConfigWatcherHandle
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more