#[non_exhaustive]pub enum ModifyGuardError {
NotARepository {
path: PathBuf,
},
RepositoryWithoutWorktree {
path: PathBuf,
},
InaccessiblePath {
path: PathBuf,
source: Error,
},
PathNotFound {
path: PathBuf,
},
CanonicalizePath {
path: PathBuf,
source: Error,
},
PathNotADirectory {
path: PathBuf,
},
PathNotAFile {
path: PathBuf,
},
ResolveAsWorktreeRelativePath {
path: PathBuf,
},
AmbiguousFilePath {
wt_path: PathBuf,
},
Backend {
source: Box<dyn Error + Send + Sync + 'static>,
},
}Expand description
Errors returned by vcs-modify-guard operations.
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.
NotARepository
The specified path does not refer to a repository supported by the enabled backends.
RepositoryWithoutWorktree
The specified path refers to a repository without a worktree, such as a Git bare repository.
InaccessiblePath
The specified path could not be accessed.
PathNotFound
The specified path was not found.
CanonicalizePath
The specified path could not be resolved to a canonical path.
PathNotADirectory
The specified path is not a directory.
PathNotAFile
The specified path does not resolve to a file.
ResolveAsWorktreeRelativePath
The specified path does not resolve to a valid path within the repository worktree.
AmbiguousFilePath
The specified path does not resolve to a single file within the repository worktree.
Backend
VCS backend error.
Trait Implementations§
Source§impl Debug for ModifyGuardError
impl Debug for ModifyGuardError
Source§impl Display for ModifyGuardError
impl Display for ModifyGuardError
Source§impl Error for ModifyGuardError
impl Error for ModifyGuardError
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()
Source§impl ErrorCompat for ModifyGuardError
impl ErrorCompat for ModifyGuardError
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moreSource§impl From<GitCliBackendError> for ModifyGuardError
Available on crate feature git-cli only.
impl From<GitCliBackendError> for ModifyGuardError
Available on crate feature
git-cli only.Source§fn from(source: GitCliBackendError) -> Self
fn from(source: GitCliBackendError) -> Self
Converts to this type from the input type.
Source§impl From<GixBackendError> for ModifyGuardError
Available on crate feature git-gix only.
impl From<GixBackendError> for ModifyGuardError
Available on crate feature
git-gix only.Source§fn from(source: GixBackendError) -> Self
fn from(source: GixBackendError) -> Self
Converts to this type from the input type.
Source§impl From<Libgit2BackendError> for ModifyGuardError
Available on crate feature git-libgit2 only.
impl From<Libgit2BackendError> for ModifyGuardError
Available on crate feature
git-libgit2 only.Source§fn from(source: Libgit2BackendError) -> Self
fn from(source: Libgit2BackendError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ModifyGuardError
impl !UnwindSafe for ModifyGuardError
impl Freeze for ModifyGuardError
impl Send for ModifyGuardError
impl Sync for ModifyGuardError
impl Unpin for ModifyGuardError
impl UnsafeUnpin for ModifyGuardError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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