Struct PollWatcher

struct PollWatcher { ... }

Polling based Watcher implementation.

By default scans through all files and checks for changed entries based on their change date. Can also be changed to perform file content change checks.

See [Config] for more details.

Implementations

impl PollWatcher

fn new<F: EventHandler>(event_handler: F, config: Config) -> crate::Result<PollWatcher>

Create a new PollWatcher, configured as needed.

fn poll(self: &Self) -> crate::Result<()>

Actively poll for changes. Can be combined with a timeout of 0 to perform only manual polling.

fn with_initial_scan<F: EventHandler, G: ScanEventHandler>(event_handler: F, config: Config, scan_callback: G) -> crate::Result<PollWatcher>

Create a new PollWatcher with an scan event handler.

scan_fallback is called on the initial scan with all files seen by the pollwatcher.

impl Debug for PollWatcher

fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result

impl Drop for PollWatcher

fn drop(self: &mut Self)

impl Freeze for PollWatcher

impl RefUnwindSafe for PollWatcher

impl Send for PollWatcher

impl Sync for PollWatcher

impl Unpin for PollWatcher

impl UnwindSafe for PollWatcher

impl Watcher for PollWatcher

fn new<F: EventHandler>(event_handler: F, config: Config) -> crate::Result<Self>

Create a new PollWatcher.

fn watch(self: &mut Self, path: &Path, recursive_mode: RecursiveMode) -> crate::Result<()>
fn unwatch(self: &mut Self, path: &Path) -> crate::Result<()>
fn kind() -> crate::WatcherKind

impl<T> Any for PollWatcher

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for PollWatcher

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for PollWatcher

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for PollWatcher

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for PollWatcher

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for PollWatcher

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for PollWatcher

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>