Module file_watcher

Source
Expand description

Code to watch configuration files for any changes.

Structs§

FileEventReceiver
The receiver half of a watch channel used for receiving Events sent by a FileWatcher.
FileEventSender
The sender half of a watch channel used by a FileWatcher for sending Events.
FileWatcher
A wrapper around a notify::Watcher to watch a set of parent directories in order to learn about changes in some specific files that they contain.
FileWatcherBuilder
Builder used to configure a FileWatcher before it starts watching for changes.

Enums§

DirEventFilter 🔒
A filter for deciding what to do with a notify::Event pertaining to files that are relative to one of the directories we are watching.
Event
Event possibly triggering a configuration reload
FileWatcherBuildError
An error coming from a FileWatcherBuilder.

Functions§

channel
Create a new channel for use with a FileWatcher.
handle_event 🔒
Map a notify event to the Event type returned by FileWatcher.
ignore_event_kind 🔒
Check whether this is a kind of [notify::Event] that we want to ignore.

Type Aliases§

NotifyWatcher 🔒
The concrete type of the underlying watcher.
Result
Result whose Err is FileWatcherBuildError.