FileWatcher

Trait FileWatcher 

Source
pub trait FileWatcher: Send + Sync {
    // Required methods
    fn start(&self) -> Result<()>;
    fn stop(&self) -> Result<()>;
}
Expand description

File watcher trait for testability

This trait allows mocking file watching behavior in tests, following London School TDD principles of defining contracts through interfaces.

Required Methods§

Source

fn start(&self) -> Result<()>

Start watching for file changes

§Returns

Result indicating success or failure

Source

fn stop(&self) -> Result<()>

Stop watching for file changes

Implementors§