pub enum GitError {
Show 16 variants
NotInRepository {
start: PathBuf,
},
BareRepository {
start: PathBuf,
},
Open {
start: PathBuf,
source: Error,
},
Walk(Error),
NonUtf8Path {
path: String,
source: FromUtf8Error,
},
InvalidPath(InvalidRepoPath),
Read {
path: RepoPath,
source: Error,
},
UnknownRef {
name: String,
source: Error,
},
NoHeadCommit {
base_ref: String,
source: Error,
},
NoMergeBase {
base_ref: String,
head_ref: String,
},
MergeBase {
base_ref: String,
head_ref: String,
source: Error,
},
NoHistory(Error),
History {
commit: CommitId,
source: Error,
},
CommitTree {
commit: CommitId,
source: Error,
},
ReadBlob {
path: RepoPath,
commit: CommitId,
source: Error,
},
FileTooLarge {
path: RepoPath,
size_bytes: u64,
max_bytes: u64,
},
}Variants§
NotInRepository
BareRepository
Open
Walk(Error)
NonUtf8Path
InvalidPath(InvalidRepoPath)
Read
UnknownRef
NoHeadCommit
NoMergeBase
MergeBase
NoHistory(Error)
History
CommitTree
ReadBlob
FileTooLarge
Trait Implementations§
Source§impl Error for GitError
impl Error for GitError
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 From<InvalidRepoPath> for GitError
impl From<InvalidRepoPath> for GitError
Source§fn from(source: InvalidRepoPath) -> Self
fn from(source: InvalidRepoPath) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for GitError
impl !UnwindSafe for GitError
impl Forget for GitError
impl Freeze for GitError
impl Move for GitError
impl Send for GitError
impl Sync for GitError
impl Unpin for GitError
impl UnsafeUnpin for GitErrorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const Frame is !null: UnsafeUnpin,
PhantomData<Frame>: UnsafeUnpin,
*const () is !null: UnsafeUnpin,
PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin,
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
Source§impl<T> ErrorExt for T
impl<T> ErrorExt for T
Source§fn raise_typed(self) -> Exn<Self>where
Self: Sized,
fn raise_typed(self) -> Exn<Self>where
Self: Sized,
Raise this error as a typed exception, retaining
Self even when it is already an Error.Source§fn and_raise_typed<T>(self, context: T) -> Exn<T>
fn and_raise_typed<T>(self, context: T) -> Exn<T>
Like
Self::and_raise(), retaining the context’s type in an exception.Source§fn raise_erased(self) -> Exnwhere
Self: Sized,
fn raise_erased(self) -> Exnwhere
Self: Sized,
Raise this error as a new exception, with type erasure.
Tree-backed
crate::Error values reuse their existing frame and caller location.