#[non_exhaustive]pub enum Error {
Show 18 variants
NotARepository {
path: PathBuf,
},
EmptyRepository,
NotFound {
kind: NotFoundKind,
name: String,
},
InvalidCommitId {
value: String,
},
InvalidObjectId {
value: String,
},
InvalidRefName {
value: String,
},
NotACommit {
id: CommitId,
},
NotATree {
id: ObjectId,
},
PathNotFound {
path: PathBuf,
commit: Option<CommitId>,
},
NonUtf8Path {
path: PathBuf,
},
BareRepositoryUnsupported {
operation: &'static str,
},
UnsupportedBackendFeature {
backend: Option<BackendKind>,
feature: &'static str,
},
UnsupportedObjectFormat {
format: String,
},
HashCollision,
CorruptRepository {
message: String,
},
Io(Error),
TaskJoin {
message: String,
},
Backend {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
}Expand description
The public error type for all endringer operations.
Marked #[non_exhaustive] — new variants may be added in minor releases.
Always include a wildcard arm when matching.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotARepository
The path does not contain a recognised repository.
EmptyRepository
The repository exists but has no commits yet.
NotFound
A named object (commit, ref, branch, tag, remote, …) was not found.
InvalidCommitId
A commit ID hex string was invalid (wrong length or non-hex chars).
InvalidObjectId
An object ID hex string was invalid (wrong length or non-hex chars).
InvalidRefName
A ref name string was invalid.
NotACommit
An object was found but is not a commit.
NotATree
An object was found but is not a tree.
PathNotFound
A path was not present in the tree of the given commit.
NonUtf8Path
A path could not be represented as valid UTF-8.
BareRepositoryUnsupported
The operation is not supported on a bare repository.
UnsupportedBackendFeature
The backend does not support this feature for this repository.
UnsupportedObjectFormat
The repository uses an object format endringer does not fully support.
HashCollision
A SHA-1 collision was detected by gix’s collision-detecting hasher.
CorruptRepository
The repository data appears corrupt.
Io(Error)
An I/O error.
TaskJoin
A tokio::task::spawn_blocking task failed to join.
Backend
An unclassified error from the backend.
message carries a human-readable description. source carries the
original error chain for debugging.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()