Struct PollWatcher
pub struct PollWatcher { /* private fields */ }
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) -> Result<PollWatcher>Create a new
PollWatcher, configured as needed.fn poll(&self) -> 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) -> Result<PollWatcher>Create a new
PollWatcherwith an scan event handler.scan_fallbackis called on the initial scan with all files seen by the pollwatcher.
Trait Implementations
impl Debug for PollWatcher
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Drop for PollWatcher
fn drop(&mut self)
impl Watcher for PollWatcher
fn new<F: EventHandler>(event_handler: F, config: Config) -> Result<Self>Create a new
PollWatcher.fn watch(&mut self, path: &Path, recursive_mode: RecursiveMode) -> Result<()>fn unwatch(&mut self, path: &Path) -> Result<()>fn kind() -> WatcherKind
Auto Trait Implementations
impl Freeze for PollWatcher
impl RefUnwindSafe for PollWatcher
impl Send for PollWatcher
impl Sync for PollWatcher
impl Unpin for PollWatcher
impl UnsafeUnpin for PollWatcher
impl UnwindSafe for PollWatcher
Blanket Implementations
impl<T> Any for PollWatcher
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for PollWatcher
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for PollWatcher
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for PollWatcher
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for PollWatcher
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for PollWatcher
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for PollWatcher
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>