pub trait DirWatch: Send {
// Required method
fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Vec<DirChange>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Changes to the entries of one directory, from Handle::watch.
Required Methods§
Sourcefn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Vec<DirChange>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Vec<DirChange>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The next changes, in the order they happened; None once the watch
has stopped. A watch that stops without DirChangeKind::Deleted
may have lost changes, and the server asks for a new one. The server
leaves out names it cannot use, and takes a rename from or to one as
the addition or removal of the other name.
Must be cancel-safe: the server may drop the future before it completes, and changes it had not returned must come with the next call.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".