Skip to main content

Error

Enum Error 

Source
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

Fields

§error: Error
§

LockFileDeserialization

Fields

§path: PathBuf
§error: Error
§

ManifestEval

Fields

§package: Option<Ident>
§files: Files
§error: Box<Error>
§

NoProjectDir

§

RestrictedPath

Fields

§package_url: Box<Url>

The url of the git package that tried the bad import.

§package_commit: ObjectId

The git id of the bad package.

§package_path: PathBuf

The relative path of the bad package within its git repo.

§attempted: PathBuf
§restriction: PathBuf
§

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.

Fields

§path: PathBuf
§

Git(Error)

There was some error interacting with a git repository.

§

InvalidUrl

Fields

§

InvalidPathInIndexPackage

§

InternalManifestError

Fields

§path: PathBuf
§

TempFilePersist

There was an error persisting a temporary file.

Fields

§

InvalidIndexDep

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.

Fields

§id: Id
§

UnknownIndexPackageVersion

The requested version of package id wasn’t found in the package index.

Fields

§id: Id
§requested: SemVer
§available: Vec<SemVer>
§

DuplicateIndexPackageVersion

While trying to insert a package in the index, we found that that same package and version was already present.

Fields

§id: Id
§version: SemVer
§

PackageIndexSerialization

We failed to serialize the index description of a package.

Fields

§error: Error
§

PackageIndexDeserialization

We failed to deserialize the index description of a package.

Fields

§error: Error
§

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.

Fields

§id: Id
§manifest_dir: PathBuf
§

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

Source§

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

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

impl Display for Error

Source§

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

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

impl Error for Error

1.30.0 · 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<BuilderError> for Error

Source§

fn from(error: BuilderError) -> Error

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<PersistError> for Error

Source§

fn from(error: PersistError) -> Self

Converts to this type from the input type.

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> 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> ErasedDestructor for T
where T: 'static,

Source§

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

Source§

fn exact_from(value: T) -> U

Source§

impl<T, U> ExactInto<U> for T
where U: ExactFrom<T>,

Source§

fn exact_into(self) -> U

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> 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, U> OverflowingInto<U> for T
where U: OverflowingFrom<T>,

Source§

impl<T, U> RoundingInto<U> for T
where U: RoundingFrom<T>,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> SaturatingInto<U> for T
where U: SaturatingFrom<T>,

Source§

impl<'ast, S, T> ToAst<'ast, T> for S
where T: FromMainline<'ast, S>,

Source§

fn to_ast(&self, alloc: &'ast AstAlloc, pos_table: &PosTable) -> T

Source§

impl<T> ToDebugString for T
where T: Debug,

Source§

fn to_debug_string(&self) -> String

Returns the String produced by Ts Debug implementation.

§Examples
use malachite_base::strings::ToDebugString;

assert_eq!([1, 2, 3].to_debug_string(), "[1, 2, 3]");
assert_eq!(
    [vec![2, 3], vec![], vec![4]].to_debug_string(),
    "[[2, 3], [], [4]]"
);
assert_eq!(Some(5).to_debug_string(), "Some(5)");
Source§

impl<S, T> ToMainline<T> for S
where T: FromAst<S>,

Source§

fn to_mainline(&self, pos_table: &mut PosTable) -> T

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> TryConvert<'_, T> for U
where U: TryFrom<T>,

Source§

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

Source§

fn try_convert( _: &AstAlloc, from: T, ) -> Result<U, <U as TryConvert<'_, T>>::Error>

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, U> WrappingInto<U> for T
where U: WrappingFrom<T>,

Source§

fn wrapping_into(self) -> U