Skip to main content

Module file_watcher

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.