pub struct TreeReloader {
handle: JoinHandle<()>,
stop: Arc<Notify>,
}Expand description
A running reloader, stopped by TreeReloader::stop or by dropping it.
Fields§
§handle: JoinHandle<()>§stop: Arc<Notify>Implementations§
Source§impl TreeReloader
impl TreeReloader
Sourcepub fn spawn(
path: PathBuf,
live: Arc<LiveTreeLimits>,
interval: Duration,
) -> Self
pub fn spawn( path: PathBuf, live: Arc<LiveTreeLimits>, interval: Duration, ) -> Self
Starts re-reading path into live every interval.
The first tick fires after one interval, not immediately: the bounds were resolved from this same file moments ago, at startup, so a pass at zero would only read it twice.
Trait Implementations§
Source§impl Drop for TreeReloader
impl Drop for TreeReloader
Auto Trait Implementations§
impl Freeze for TreeReloader
impl RefUnwindSafe for TreeReloader
impl Send for TreeReloader
impl Sync for TreeReloader
impl Unpin for TreeReloader
impl UnsafeUnpin for TreeReloader
impl UnwindSafe for TreeReloader
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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