Technically this means that you can now construct an instance of
PollWatcher that performs full file contents hashing to augment the
mtime comparison. This works well for pseudo filesystems that often
don't adhere to durable filesystem metadata norms like accurate file
sizes, modification times, etc.
Closes#391
This changes the `Watcher` trait to be object safe, which allows users to
dynamically select which backend to use. This can be helpful on systems that
support multiple file watching systems that have different tradeoffs. For
example, Chromium's file watcher on OS X will use an fsevent backend
when watching recursive directories, and a kqueues backend when not.
In order to implement this, this makes a few changes to Watcher:
* removes `new_immediate` constructor.
* removes the `<P: AsRef<Path>>` from the `watch` and `unwatch`.
This then replaces (and renames) calls with `notify::recommended_watcher()`
to get similar behavior as the old constructor.
`anymap` has some undefined behavior, and appears to no longer be maintained.
This patch replaces anymap with an opaque `EventAttributes` type, which
contains a number of accessor methods to get and set values. Under the
covers, this type is simply a box of a struct of option types. However,
since it's opaque the underlying type could be swapped out with an
alternative type that can be extended to support more attributes without
breaking users.
Closes#306