pub enum Error {
Show 20 variants
Io {
path: Option<PathBuf>,
error: Error,
},
LockFileDeserialization {
path: PathBuf,
error: Error,
},
ManifestEval {
package: Option<Ident>,
files: Files,
error: Box<Error>,
},
NoProjectDir,
RestrictedPath {
package_url: Box<Url>,
package_commit: ObjectId,
package_path: PathBuf,
attempted: PathBuf,
restriction: PathBuf,
},
RelativeGitImport {
path: PathBuf,
},
Git(Error),
InvalidUrl {
msg: String,
},
InvalidPathInIndexPackage {
id: String,
inner: RelativePathError,
},
InternalManifestError {
path: PathBuf,
msg: String,
},
TempFilePersist {
error: PersistError,
},
InvalidIndexDep {
id: Id,
dep: Box<UnversionedDependency>,
},
UnknownIndexPackage {
id: Id,
},
UnknownIndexPackageVersion {
id: Id,
requested: SemVer,
available: Vec<SemVer>,
},
DuplicateIndexPackageVersion {
id: Id,
version: SemVer,
},
PackageIndexSerialization {
pkg: Package,
error: Error,
},
PackageIndexDeserialization {
error: Error,
},
Resolution(Box<ResolveError>),
MismatchedManifestPath {
id: Id,
manifest_dir: PathBuf,
},
OtherGit(Error),
}Expand description
Errors related to package management.
Variants§
Io
LockFileDeserialization
ManifestEval
NoProjectDir
RestrictedPath
Fields
RelativeGitImport
There was an attempt to import a git repository from a relative path, where the package doing the importing wasn’t a path package.
Git(Error)
There was some error interacting with a git repository.
InvalidUrl
InvalidPathInIndexPackage
InternalManifestError
TempFilePersist
There was an error persisting a temporary file.
Fields
error: PersistErrorInvalidIndexDep
A package in the index (or, hopefully, a package potentially destined for the index, because packages actually in the index should be validated) tried to depend on a path or git dependency.
UnknownIndexPackage
The package id wasn’t found in the package index.
UnknownIndexPackageVersion
The requested version of package id wasn’t found in the package index.
DuplicateIndexPackageVersion
While trying to insert a package in the index, we found that that same package and version was already present.
PackageIndexSerialization
We failed to serialize the index description of a package.
PackageIndexDeserialization
We failed to deserialize the index description of a package.
Resolution(Box<ResolveError>)
MismatchedManifestPath
Based on the index id, we expected a manifest file to have a path ending with a particular suffix but it didn’t.
OtherGit(Error)
Some other error interacting with git.
gix’s errors are highly structured, and for many of them we only care about reporting them as strings.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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()
Source§impl From<BuilderError> for Error
impl From<BuilderError> for Error
Source§fn from(error: BuilderError) -> Error
fn from(error: BuilderError) -> Error
Source§impl From<PersistError> for Error
impl From<PersistError> for Error
Source§fn from(error: PersistError) -> Self
fn from(error: PersistError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !Send for Error
impl !Sync for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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