pub struct DebouncedEventHandler { /* private fields */ }Expand description
Debounced file change handler
Prevents rapid successive changes from causing excessive re-indexing
Implementations§
Source§impl DebouncedEventHandler
impl DebouncedEventHandler
pub fn new() -> Self
Sourcepub async fn AddChange(&self, path: PathBuf, change_type: FileChangeType)
pub async fn AddChange(&self, path: PathBuf, change_type: FileChangeType)
Add a file change event
Sourcepub async fn ProcessPendingChanges(
&self,
age_cutoff: Duration,
index_arc: &RwLock<FileIndex>,
config: &IndexingConfig,
) -> Result<Vec<ProcessedChange>>
pub async fn ProcessPendingChanges( &self, age_cutoff: Duration, index_arc: &RwLock<FileIndex>, config: &IndexingConfig, ) -> Result<Vec<ProcessedChange>>
Process pending changes older than the specified duration
Sourcepub async fn ClearPending(&self) -> usize
pub async fn ClearPending(&self) -> usize
Clear all pending changes
Sourcepub async fn PendingCount(&self) -> usize
pub async fn PendingCount(&self) -> usize
Get the number of pending changes
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DebouncedEventHandler
impl !RefUnwindSafe for DebouncedEventHandler
impl Send for DebouncedEventHandler
impl Sync for DebouncedEventHandler
impl Unpin for DebouncedEventHandler
impl !UnwindSafe for DebouncedEventHandler
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].