Skip to main content

EventAggregateHandler

Trait EventAggregateHandler 

Source
pub trait EventAggregateHandler {
    // Required method
    fn on_event_handle(
        &self,
        _changed_files: HashSet<String>,
        _deleted_files: HashSet<String>,
    );

    // Provided method
    fn on_error(&self, _error: Error) { ... }
}
Expand description

EventAggregateHandler is a trait for handling aggregated file system events. It provides methods to handle changes and deletions of files, as well as errors. Implementors of this trait can define custom behavior for these events. The default implementation does nothing for the on_error method. This trait is intended to be used with the file system watcher to aggregate events and handle them in a single place.

Required Methods§

Source

fn on_event_handle( &self, _changed_files: HashSet<String>, _deleted_files: HashSet<String>, )

Handle a batch of file system events.

Provided Methods§

Source

fn on_error(&self, _error: Error)

Handle an error that occurs during file system watching.

Implementors§