Struct distant_core::Watcher
source · [−]pub struct Watcher { /* private fields */ }
Expand description
Represents a watcher of some path on a remote machine
Implementations
sourceimpl Watcher
impl Watcher
sourcepub async fn watch(
tenant: impl Into<String>,
channel: SessionChannel,
path: impl Into<PathBuf>,
recursive: bool,
only: impl Into<ChangeKindSet>,
except: impl Into<ChangeKindSet>
) -> Result<Self, WatchError>
pub async fn watch(
tenant: impl Into<String>,
channel: SessionChannel,
path: impl Into<PathBuf>,
recursive: bool,
only: impl Into<ChangeKindSet>,
except: impl Into<ChangeKindSet>
) -> Result<Self, WatchError>
Creates a watcher for some remote path
sourcepub fn is_active(&self) -> bool
pub fn is_active(&self) -> bool
Returns true if the watcher is still actively watching for changes
sourcepub async fn next(&mut self) -> Option<Change>
pub async fn next(&mut self) -> Option<Change>
Returns the next change detected by the watcher, or none if the watcher has concluded
sourcepub async fn unwatch(&mut self) -> Result<(), UnwatchError>
pub async fn unwatch(&mut self) -> Result<(), UnwatchError>
Unwatches the path being watched, closing out the watcher
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Watcher
impl Send for Watcher
impl Sync for Watcher
impl Unpin for Watcher
impl !UnwindSafe for Watcher
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more