Struct comfy_wgpu::notify::PollWatcher
pub struct PollWatcher { /* private fields */ }Expand description
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
impl PollWatcher
pub fn new<F>(event_handler: F, config: Config) -> Result<PollWatcher, Error>where
F: EventHandler,
pub fn new<F>(event_handler: F, config: Config) -> Result<PollWatcher, Error>where F: EventHandler,
Create a new PollWatcher, configured as needed.
pub fn poll(&self) -> Result<(), Error>
pub fn poll(&self) -> Result<(), Error>
Actively poll for changes. Can be combined with a timeout of 0 to perform only manual polling.
pub fn with_initial_scan<F, G>(
event_handler: F,
config: Config,
scan_callback: G
) -> Result<PollWatcher, Error>where
F: EventHandler,
G: ScanEventHandler,
pub fn with_initial_scan<F, G>( event_handler: F, config: Config, scan_callback: G ) -> Result<PollWatcher, Error>where F: EventHandler, G: ScanEventHandler,
Create a new PollWatcher with an scan event handler.
scan_fallback is called on the initial scan with all files seen by the pollwatcher.
Trait Implementations§
§impl Debug for PollWatcher
impl Debug for PollWatcher
§impl Watcher for PollWatcher
impl Watcher for PollWatcher
§fn new<F>(event_handler: F, config: Config) -> Result<PollWatcher, Error>where
F: EventHandler,
fn new<F>(event_handler: F, config: Config) -> Result<PollWatcher, Error>where F: EventHandler,
Create a new PollWatcher.
§fn watch(
&mut self,
path: &Path,
recursive_mode: RecursiveMode
) -> Result<(), Error>
fn watch( &mut self, path: &Path, recursive_mode: RecursiveMode ) -> Result<(), Error>
Begin watching a new path. Read more
§fn kind() -> WatcherKind
fn kind() -> WatcherKind
Returns the watcher kind, allowing to perform backend-specific tasks
Auto Trait Implementations§
impl RefUnwindSafe for PollWatcher
impl Send for PollWatcher
impl Sync for PollWatcher
impl Unpin for PollWatcher
impl UnwindSafe for PollWatcher
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more