pub struct FileWatcher { /* private fields */ }Expand description
File watcher with debouncing for Rust source files
Implementations§
Source§impl FileWatcher
impl FileWatcher
Sourcepub fn new(
engine_dir: &Path,
tx: UnboundedSender<WatchEvent>,
shutdown_rx: Receiver<bool>,
) -> Result<Self>
pub fn new( engine_dir: &Path, tx: UnboundedSender<WatchEvent>, shutdown_rx: Receiver<bool>, ) -> Result<Self>
Create a new file watcher.
Watches engine/src/**/*.rs and engine/Cargo.toml for changes.
Events are debounced with a 500ms timeout to handle rapid multi-file saves.
§Arguments
engine_dir- Path to the engine directory (containing src/ and Cargo.toml)tx- Channel to send watch events to
Auto Trait Implementations§
impl Freeze for FileWatcher
impl !RefUnwindSafe for FileWatcher
impl Send for FileWatcher
impl Sync for FileWatcher
impl Unpin for FileWatcher
impl UnsafeUnpin for FileWatcher
impl !UnwindSafe for FileWatcher
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