pub struct HotReloadConfig {
pub enabled: bool,
pub debounce_duration: Duration,
pub recursive: bool,
pub extensions: HashSet<String>,
pub ignore_hidden: bool,
pub ignore_temp: bool,
}Expand description
Configuration for hot reloading behavior.
Fields§
§enabled: boolWhether hot reloading is enabled (default: true in debug, false in release).
debounce_duration: DurationDebounce delay to avoid duplicate reloads (default: 100ms).
File systems often emit multiple events for a single change. This delay groups rapid changes together.
recursive: boolWhether to watch subdirectories recursively (default: true).
extensions: HashSet<String>File extensions to watch (empty = watch all files).
Whether to ignore hidden files (starting with ‘.’).
ignore_temp: boolWhether to ignore temporary files (ending with ‘~’, ‘.tmp’, ‘.swp’, etc.).
Implementations§
Source§impl HotReloadConfig
impl HotReloadConfig
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Sets whether hot reloading is enabled.
Sourcepub fn with_debounce(self, duration: Duration) -> Self
pub fn with_debounce(self, duration: Duration) -> Self
Sets the debounce duration.
Sourcepub fn with_recursive(self, recursive: bool) -> Self
pub fn with_recursive(self, recursive: bool) -> Self
Sets whether to watch recursively.
Sourcepub fn watch_extension(self, ext: impl Into<String>) -> Self
pub fn watch_extension(self, ext: impl Into<String>) -> Self
Adds a file extension to watch (e.g., “png”, “json”).
Sets whether to ignore hidden files.
Sourcepub fn with_ignore_temp(self, ignore: bool) -> Self
pub fn with_ignore_temp(self, ignore: bool) -> Self
Sets whether to ignore temporary files.
Sourcepub fn should_watch(&self, path: &Path) -> bool
pub fn should_watch(&self, path: &Path) -> bool
Returns true if a path should be watched based on configuration.
Trait Implementations§
Source§impl Clone for HotReloadConfig
impl Clone for HotReloadConfig
Source§fn clone(&self) -> HotReloadConfig
fn clone(&self) -> HotReloadConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HotReloadConfig
impl Debug for HotReloadConfig
Auto Trait Implementations§
impl Freeze for HotReloadConfig
impl RefUnwindSafe for HotReloadConfig
impl Send for HotReloadConfig
impl Sync for HotReloadConfig
impl Unpin for HotReloadConfig
impl UnsafeUnpin for HotReloadConfig
impl UnwindSafe for HotReloadConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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>
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>
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<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().