#[non_exhaustive]pub enum WatchRootError {
NotFound {
path: PathBuf,
},
NotADirectory {
path: PathBuf,
},
Overlaps {
path: PathBuf,
existing: PathBuf,
},
Source(SourceError),
Closed,
}Expand description
Why a root could not be watched.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotFound
The root does not exist.
NotADirectory
The root exists but is not a directory.
Overlaps
The root overlaps a root this watcher already covers. Roots must be disjoint; subsuming overlapping trees is the layer above’s job.
Fields
Source(SourceError)
The platform source could not start.
Closed
The watcher’s driver has already stopped.
Implementations§
Source§impl WatchRootError
impl WatchRootError
Sourcepub const fn is_not_found(&self) -> bool
pub const fn is_not_found(&self) -> bool
Whether this is NotFound.
Sourcepub const fn is_not_a_directory(&self) -> bool
pub const fn is_not_a_directory(&self) -> bool
Whether this is NotADirectory.
Sourcepub const fn is_overlaps(&self) -> bool
pub const fn is_overlaps(&self) -> bool
Whether this is Overlaps.
Trait Implementations§
Source§impl Debug for WatchRootError
impl Debug for WatchRootError
Source§impl Display for WatchRootError
impl Display for WatchRootError
Source§impl Error for WatchRootError
impl Error for WatchRootError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for WatchRootError
impl !UnwindSafe for WatchRootError
impl Freeze for WatchRootError
impl Send for WatchRootError
impl Sync for WatchRootError
impl Unpin for WatchRootError
impl UnsafeUnpin for WatchRootError
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more