clankerdiff_watch/error.rs
1use clankerdiff_git::GitError;
2use std::path::PathBuf;
3
4/// A failure while starting, watching, or loading for a [`crate::RepositoryWatcher`].
5#[derive(Debug, thiserror::Error)]
6pub enum WatchError {
7 #[error(transparent)]
8 Git(#[from] GitError),
9 /// The platform watcher could not be created or could not observe a path.
10 #[error("could not watch {path}")]
11 Watch {
12 /// The path the watcher was asked to observe.
13 path: PathBuf,
14 /// The platform watcher error.
15 #[source]
16 source: notify::Error,
17 },
18 /// The watcher task is no longer running.
19 #[error("the repository watcher has stopped")]
20 Stopped,
21}