pub struct ConfigWatcher { /* private fields */ }Expand description
Background watcher that hot-reloads the server config file on change.
Implementations§
Source§impl ConfigWatcher
impl ConfigWatcher
pub fn new(path: impl Into<PathBuf>, store: Arc<UnifiedStore>) -> Self
Sourcepub fn spawn(self) -> JoinHandle<()>
pub fn spawn(self) -> JoinHandle<()>
Spawn the watcher as a detached background thread (lives until process exit — no cancellation handle needed).
Auto Trait Implementations§
impl !RefUnwindSafe for ConfigWatcher
impl !UnwindSafe for ConfigWatcher
impl Forget for ConfigWatcher
impl Freeze for ConfigWatcherwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<UnifiedStore> is !null: Freeze,
PhantomData<ArcInner<UnifiedStore>>: Freeze,
impl Move for ConfigWatcher
impl Send for ConfigWatcher
impl Sync for ConfigWatcher
impl Unpin for ConfigWatcher
impl UnsafeUnpin for ConfigWatcherwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<UnifiedStore> is !null: UnsafeUnpin,
PhantomData<ArcInner<UnifiedStore>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request