pub struct FsWorker { /* private fields */ }Expand description
Handle to a running worker thread. Dropping it shuts the thread down and joins it.
Implementations§
Source§impl FsWorker
impl FsWorker
Sourcepub fn spawn<S, F>(fs: S, options: IgnoreOptions, sink: F) -> Self
pub fn spawn<S, F>(fs: S, options: IgnoreOptions, sink: F) -> Self
Start a worker over fs, delivering results through sink.
sink is a callback rather than a channel so the caller decides how events are
wrapped — app turns them into AppMessage::Fs, tests collect them directly.
Sourcepub fn spawn_with_window<S, F>(
fs: S,
options: IgnoreOptions,
watch_window: Duration,
sink: F,
) -> Self
pub fn spawn_with_window<S, F>( fs: S, options: IgnoreOptions, watch_window: Duration, sink: F, ) -> Self
As Self::spawn, with an explicit debounce window. Tests use a short one.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FsWorker
impl !UnwindSafe for FsWorker
impl Freeze for FsWorker
impl Send for FsWorker
impl Sync for FsWorker
impl Unpin for FsWorker
impl UnsafeUnpin for FsWorker
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