pub enum WatcherError {
PathNotFound(PathBuf),
AlreadyWatched(PathBuf),
NotWatched(PathBuf),
WatcherClosed,
NotifyError(Error),
SendError,
InitError(String),
}Expand description
文件监控错误
Variants§
PathNotFound(PathBuf)
路径不存在
AlreadyWatched(PathBuf)
路径已被监控
NotWatched(PathBuf)
路径未被监控
WatcherClosed
监控器已关闭
NotifyError(Error)
底层 notify 错误
SendError
通道发送错误
InitError(String)
初始化失败
Implementations§
Source§impl WatcherError
impl WatcherError
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
检查是否是路径不存在错误
Sourcepub fn is_already_watched(&self) -> bool
pub fn is_already_watched(&self) -> bool
检查是否是已监控错误
Trait Implementations§
Source§impl Debug for WatcherError
impl Debug for WatcherError
Source§impl Display for WatcherError
impl Display for WatcherError
Source§impl Error for WatcherError
impl Error for WatcherError
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 Freeze for WatcherError
impl !RefUnwindSafe for WatcherError
impl Send for WatcherError
impl Sync for WatcherError
impl Unpin for WatcherError
impl !UnwindSafe for WatcherError
Blanket Implementations§
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