#[non_exhaustive]pub enum NotARepositoryReason {
NoRepositoryAt {
path: PathBuf,
},
GitfileNotRegularFile {
path: PathBuf,
},
GitfileMissingGitdir {
path: PathBuf,
},
GitfileUnreadable {
path: PathBuf,
error: Error,
},
}Expand description
Why a path could not be opened as a Git repository; carried by Error::NotARepository.
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.
NoRepositoryAt
No usable git directory exists at path, or discovery found none at or above it.
GitfileNotRegularFile
A .git entry is a FIFO, socket or device rather than a regular file or directory.
GitfileMissingGitdir
A gitfile has no gitdir: <path> line.
GitfileUnreadable
A gitfile exists but could not be read (permissions, invalid UTF-8, …).
Trait Implementations§
Source§impl Debug for NotARepositoryReason
impl Debug for NotARepositoryReason
Source§impl Display for NotARepositoryReason
impl Display for NotARepositoryReason
Source§impl Error for NotARepositoryReason
impl Error for NotARepositoryReason
1.30.0 · 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 NotARepositoryReason
impl !UnwindSafe for NotARepositoryReason
impl Freeze for NotARepositoryReason
impl Send for NotARepositoryReason
impl Sync for NotARepositoryReason
impl Unpin for NotARepositoryReason
impl UnsafeUnpin for NotARepositoryReason
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