Enum PathOp

#[non_exhaustive]
pub enum PathOp

An operation to apply to a watcher

See Watcher::update_paths for more information.

Variants

Watch(PathBuf, WatchPathConfig)

Path should be watched

Unwatch(PathBuf)

Path should be unwatched

Implementations

impl PathOp

fn watch_recursive<P: Into<PathBuf>>(path: P) -> Self

Watch the path with RecursiveMode::Recursive

fn watch_non_recursive<P: Into<PathBuf>>(path: P) -> Self

Watch the path with RecursiveMode::NonRecursive

fn unwatch<P: Into<PathBuf>>(path: P) -> Self

Unwatch the path

fn as_path(&self) -> &Path

Returns the path associated with this operation.

fn into_path(self) -> PathBuf

Returns the path associated with this operation.

Trait Implementations

impl Debug for PathOp

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto Trait Implementations

impl Freeze for PathOp

impl RefUnwindSafe for PathOp

impl Send for PathOp

impl Sync for PathOp

impl Unpin for PathOp

impl UnsafeUnpin for PathOp

impl UnwindSafe for PathOp

Blanket Implementations

impl<T> Any for PathOp where T: 'static + ?Sized,

impl<T> Borrow<T> for PathOp where T: ?Sized,

impl<T> BorrowMut<T> for PathOp where T: ?Sized,

impl<T> From<T> for PathOp

impl<T, U> Into<U> for PathOp where U: From<T>,

impl<T, U> TryFrom<U> for PathOp where U: Into<T>,

impl<T, U> TryInto<U> for PathOp where U: TryFrom<T>,