pub struct WatcherRegistry { /* private fields */ }Expand description
Registry of available session watchers.
The registry maintains a collection of watcher implementations and provides methods to query their availability and retrieve watchers by name.
Implementations§
Source§impl WatcherRegistry
impl WatcherRegistry
Sourcepub fn register(&mut self, watcher: Box<dyn Watcher>)
pub fn register(&mut self, watcher: Box<dyn Watcher>)
Registers a new watcher with the registry.
Sourcepub fn all_watchers(&self) -> Vec<&dyn Watcher>
pub fn all_watchers(&self) -> Vec<&dyn Watcher>
Returns all registered watchers.
Sourcepub fn available_watchers(&self) -> Vec<&dyn Watcher>
pub fn available_watchers(&self) -> Vec<&dyn Watcher>
Returns only watchers that are currently available.
A watcher is available if the tool it watches is installed and configured on this system.
Sourcepub fn enabled_watchers(&self, enabled_watchers: &[String]) -> Vec<&dyn Watcher>
pub fn enabled_watchers(&self, enabled_watchers: &[String]) -> Vec<&dyn Watcher>
Returns watchers that are both available and enabled in config.
Only watchers whose names appear in the enabled_watchers list
and are also available on the system are returned.
This method is intended for use by the import command and daemon to filter which watchers actively scan for sessions.
Sourcepub fn get_watcher(&self, name: &str) -> Option<&dyn Watcher>
pub fn get_watcher(&self, name: &str) -> Option<&dyn Watcher>
Retrieves a watcher by its name.
Returns None if no watcher with the given name is registered.
Sourcepub fn all_watch_paths(&self) -> Vec<PathBuf>
pub fn all_watch_paths(&self) -> Vec<PathBuf>
Returns all paths that should be watched for changes.
Collects watch paths from all available watchers into a single list.