pub trait Watcher: Send {
// Required method
fn next_batch<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<WatchBatch>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A stream of debounced change batches. The indirection exists for the engine’s own tests, which script batches instead of touching a real file system.
Required Methods§
Sourcefn next_batch<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<WatchBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next_batch<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<WatchBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The next batch; None when the watcher died for good.
Must be cancel-safe: the session polls it in a select! against
the running build and drops the future when the run finishes
first, so a batch that was already taken from the underlying
stream would be lost with it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".