pub trait WatcherPort: Send + Sync {
// Required methods
fn watch<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
debounce_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WatchHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn recv_event<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 WatchHandle,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Option<WatchEvent>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn unwatch<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 WatchHandle,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Filesystem watch port with debounced event delivery.
Required Methods§
Sourcefn watch<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
debounce_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WatchHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn watch<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
debounce_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WatchHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Begin watching path (non-recursive) with debounce_ms coalescing.
Sourcefn recv_event<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 WatchHandle,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Option<WatchEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn recv_event<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 WatchHandle,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Option<WatchEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Receive the next debounced event, waiting up to timeout.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".