pub struct WatchError(/* private fields */);Expand description
An opaque filesystem-watch backend failure — the watcher couldn’t start, or couldn’t register/deregister a watched path.
It wraps the crate’s private watch backend so a consumer can classify and source-chain the failure without naming — or depending on — that third-party crate:
is_path_not_found— the watched.git/.jjdirectory does not exist (removed, or never present);is_watch_limit— the OS watch-descriptor limit was reached (e.g. Linux inotify’smax_user_watches);io_error— the rawstd::io::Errorwhen the backend failure was an I/O one (also reachable viastd::error::Error::source);paths— the paths the backend blamed, if any.
Because the backend type never appears in a public signature, a backend major
bump is an internal change here — not a breaking one downstream. Obtain one
from Error::watch_error or by matching Error::Notify.
Implementations§
Source§impl WatchError
impl WatchError
Sourcepub fn is_path_not_found(&self) -> bool
pub fn is_path_not_found(&self) -> bool
The watched path does not exist — e.g. the .git/.jj state directory
was removed (or never existed), so the OS watch can’t be registered until
the path is present.
Sourcepub fn is_watch_limit(&self) -> bool
pub fn is_watch_limit(&self) -> bool
The OS watch-descriptor limit was reached (e.g. Linux inotify’s
max_user_watches) — the watch can’t be registered until the limit is
raised or other watches are released. Best-effort / platform-dependent.
Trait Implementations§
Source§impl Debug for WatchError
impl Debug for WatchError
Source§impl Display for WatchError
impl Display for WatchError
Source§impl Error for WatchError
impl Error for WatchError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()