Skip to main content

GitError

Enum GitError 

Source
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

Fields

§start: PathBuf
§

BareRepository

Fields

§start: PathBuf
§

Open

Fields

§start: PathBuf
§source: Error
§

Walk(Error)

§

NonUtf8Path

Fields

§path: String
§

InvalidPath(InvalidRepoPath)

§

Read

Fields

§source: Error
§

UnknownRef

Fields

§name: String
§source: Error
§

NoHeadCommit

Fields

§base_ref: String
§source: Error
§

NoMergeBase

Fields

§base_ref: String
§head_ref: String
§

MergeBase

Fields

§base_ref: String
§head_ref: String
§source: Error
§

NoHistory(Error)

§

History

Fields

§commit: CommitId
§source: Error
§

CommitTree

Fields

§commit: CommitId
§source: Error
§

ReadBlob

Fields

§commit: CommitId
§source: Error
§

FileTooLarge

Fields

§size_bytes: u64
§max_bytes: u64

Trait Implementations§

Source§

impl Debug for GitError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for GitError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for GitError

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Replaced by Error::source.
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<InvalidRepoPath> for GitError

Source§

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
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const Frame is !null: Freeze, PhantomData<Frame>: Freeze, *const () is !null: Freeze, PhantomData<ErrorData<CustomOwner>>: Freeze,

§

impl Move for GitError

§

impl Send for GitError
where RawVecInner: Send, BoxRaw<Frame>: Send, Repr: Send,

§

impl Sync for GitError
where RawVecInner: Sync, BoxRaw<Frame>: Sync, Repr: Sync,

§

impl Unpin for GitError
where *const u8 is !null: Unpin, Box<Frame>: Unpin, *const () is !null: Unpin, &'static SimpleMessage: Unpin, *const Custom is !null: Unpin,

§

impl UnsafeUnpin for GitError

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErrorExt for T
where T: Error + Send + Sync + 'static,

Source§

fn raise(self) -> Error
where Self: Sized,

Raise this error at the caller’s location, returning a public Error. An existing Error is returned unchanged, preserving its representation and allocation.
Source§

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<T>(self, context: T) -> Error
where T: Error + Send + Sync + 'static, Self: Sized,

Raise this error as a cause of context, returning a public Error. Read more
Source§

fn and_raise_typed<T>(self, context: T) -> Exn<T>
where T: Error + Send + Sync + 'static, Self: Sized,

Like Self::and_raise(), retaining the context’s type in an exception.
Source§

fn raise_erased(self) -> Exn
where Self: Sized,

Raise this error as a new exception, with type erasure. Tree-backed crate::Error values reuse their existing frame and caller location.
Source§

fn raise_all<T, I>(self, sources: I) -> Exn<Self>
where Self: Sized, T: Error + Send + Sync + 'static, I: IntoIterator, <I as IntoIterator>::Item: Into<Exn<T>>,

Raise this error as a new exception, with sources as causes.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Resource for T
where T: 'static,

Source§

type Rep = Option<T>

The type which is actually stored in-memory for this resource. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.