pub struct Watcher { /* private fields */ }Expand description
File system watcher with debouncing.
Implementations§
Source§impl Watcher
impl Watcher
Sourcepub fn new(debounce_ms: u64, sender: Sender<DaemonRequest>) -> Self
pub fn new(debounce_ms: u64, sender: Sender<DaemonRequest>) -> Self
Create a new watcher.
debounce_ms: Debounce time in milliseconds (default: 250ms)sender: Channel to send indexing requests to the daemon
Sourcepub fn default(sender: Sender<DaemonRequest>) -> Self
pub fn default(sender: Sender<DaemonRequest>) -> Self
Create a watcher with default settings (250ms debounce).
Sourcepub async fn remove_root(&mut self, path: &Path) -> Result<()>
pub async fn remove_root(&mut self, path: &Path) -> Result<()>
Remove a root from watching.
Auto Trait Implementations§
impl !RefUnwindSafe for Watcher
impl !UnwindSafe for Watcher
impl Forget for Watcher
impl Freeze for Watcher
impl Move for Watcher
impl Send for Watcher
impl Sync for Watcher
impl Unpin for Watcher
impl UnsafeUnpin for Watcher
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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