pub struct HotReloader { /* private fields */ }Expand description
Hot reloader for plugins
Implementations§
Source§impl HotReloader
impl HotReloader
Sourcepub fn new(watch_dir: &Path) -> Result<Self, PluginError>
pub fn new(watch_dir: &Path) -> Result<Self, PluginError>
Create a new hot reloader
Sourcepub fn unregister(&self, plugin_name: &str)
pub fn unregister(&self, plugin_name: &str)
Unregister a plugin file
Sourcepub fn check(&self) -> Result<Vec<ReloadEvent>, PluginError>
pub fn check(&self) -> Result<Vec<ReloadEvent>, PluginError>
Check for file changes
Sourcepub fn set_debounce(&mut self, duration: Duration)
pub fn set_debounce(&mut self, duration: Duration)
Set debounce duration
Sourcepub fn set_check_interval(&mut self, interval: Duration)
pub fn set_check_interval(&mut self, interval: Duration)
Set check interval
Sourcepub fn plugin_count(&self) -> usize
pub fn plugin_count(&self) -> usize
Get registered plugin count
Auto Trait Implementations§
impl !Freeze for HotReloader
impl !RefUnwindSafe for HotReloader
impl Send for HotReloader
impl Sync for HotReloader
impl Unpin for HotReloader
impl UnsafeUnpin for HotReloader
impl UnwindSafe for HotReloader
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