Skip to main content

GitError

Enum GitError 

Source
pub enum GitError {
Show 40 variants InvalidObjectType(String), InvalidBlobObject(String), InvalidTreeObject, InvalidTreeItem(String), EmptyTreeItems(String), InvalidSignatureType(String), InvalidCommitObject, InvalidCommit(String), InvalidTagObject(String), InvalidNoteObject(String), InvalidContextSnapshotObject(String), InvalidDecisionObject(String), InvalidEvidenceObject(String), InvalidPatchSetObject(String), InvalidPlanObject(String), InvalidProvenanceObject(String), InvalidRunObject(String), InvalidTaskObject(String), InvalidToolInvocationObject(String), InvalidIdxFile(String), InvalidPackFile(String), InvalidPackHeader(String), InvalidIndexFile(String), InvalidIndexHeader(String), InvalidArgument(String), IOError(Error), InvalidHashValue(String), DeltaObjectError(String), UnCompletedPackObject(String), InvalidObjectInfo(String), NotFoundHashValue(String), EncodeObjectError(String), ConversionError(String), InvalidPathError(String), PackEncodeError(String), ObjectNotFound(String), RepoNotFound, UnAuthorized(String), NetworkError(String), CustomError(String),
}
Expand description

Unified error enumeration for the Git-Internal library.

  • Used across object parsing, pack encode/decode, index, caching and streams.
  • Implements std::error::Error via thiserror.

Variants§

§

InvalidObjectType(String)

Invalid or unsupported git object type name.

§

InvalidBlobObject(String)

Malformed or unsupported blob object encoding.

§

InvalidTreeObject

Malformed tree object.

§

InvalidTreeItem(String)

Invalid tree entry (mode/name/hash).

§

EmptyTreeItems(String)

Tree contains no entries.

§

InvalidSignatureType(String)

Invalid commit signature type.

§

InvalidCommitObject

Malformed commit object.

§

InvalidCommit(String)

Commit parse or validation failed.

§

InvalidTagObject(String)

Malformed tag object.

§

InvalidNoteObject(String)

Malformed note object.

§

InvalidContextSnapshotObject(String)

Malformed context snapshot object.

§

InvalidDecisionObject(String)

Malformed decision object.

§

InvalidEvidenceObject(String)

Malformed evidence object.

§

InvalidPatchSetObject(String)

Malformed patch set object.

§

InvalidPlanObject(String)

Malformed plan object.

§

InvalidProvenanceObject(String)

Malformed provenance object.

§

InvalidRunObject(String)

Malformed run object.

§

InvalidTaskObject(String)

Malformed task object.

§

InvalidToolInvocationObject(String)

Malformed tool invocation object.

§

InvalidIdxFile(String)

Malformed or unsupported index (.idx) file.

§

InvalidPackFile(String)

Malformed or unsupported pack file.

§

InvalidPackHeader(String)

Invalid pack header magic or version.

§

InvalidIndexFile(String)

Malformed or unsupported git index file.

§

InvalidIndexHeader(String)

Invalid git index header.

§

InvalidArgument(String)

Invalid CLI or function argument.

§

IOError(Error)

I/O error from underlying reader or writer.

§

InvalidHashValue(String)

Invalid SHA1/SHA256 hash formatting or value.

§

DeltaObjectError(String)

Delta object reconstruction error.

§

UnCompletedPackObject(String)

Object not fully populated for packing.

§

InvalidObjectInfo(String)

Invalid decoded object info.

§

NotFoundHashValue(String)

Hash not found in current file context.

§

EncodeObjectError(String)

Failed to encode object to bytes.

§

ConversionError(String)

Text encoding or UTF-8 conversion error.

§

InvalidPathError(String)

Invalid path when locating parent tree.

§

PackEncodeError(String)

Failed to encode pack entries.

§

ObjectNotFound(String)

Object missing from caches or storage.

§

RepoNotFound

Repository not found.

§

UnAuthorized(String)

Unauthorized access.

§

NetworkError(String)

Network communication error.

§

CustomError(String)

Generic custom error for miscellaneous failures.

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
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<Error> for GitError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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> Same for T

Source§

type Output = T

Should always be Self
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> ValueSize for T

Source§

fn value_size(&self) -> usize

The size of this value in bytes, excluding allocated data. Read more
Source§

fn value_size_sum_iter<'item>(iterator: impl Iterator<Item = &'item T>) -> usize
where T: 'item,

The total sum of the sizes of all values in the given iterator, in bytes. This is default-implemented by computing ValueSize::value_size on every element and summing them. For Sized types, a more potentially efficient implementation using Iterator::count is provided. If you are implementing this trait manually, it is unlikely to be more efficient to provide a manual implementation here. Read more
Source§

fn value_size_sum_exact_size_iter<'item>( iterator: impl ExactSizeIterator<Item = &'item T>, ) -> usize
where T: 'item,

The total sum of the sizes of all values in the given exact-size-iterator, in bytes. This is default-implemented by using ValueSize::value_size_sum_iter. For Sized types, a usually more efficient implementation using ExactSizeIterator::len is provided. If you are implementing this trait manually, it is unlikely to be more efficient to provide a manual implementation here. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,